Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/blobject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def method_missing method, *params, &block
super
end

def respond_to? method
def respond_to? method, include_all=false
super || self.__respond_to__?(method)
end

Expand Down
4 changes: 4 additions & 0 deletions spec/blobject_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def b.to_ary
it 'returns false for :to_ary because that method is not allowed' do
refute Blobject.new.respond_to? :to_ary
end

it 'accepts the include_all optional parameter' do
assert b.respond_to?(:name, false)
end
end

describe 'to_hash' do
Expand Down