Module: Remotable::CoreExt::Object
- Defined in:
- lib/remotable/core_ext/object.rb
Instance Method Summary collapse
- #does_not_respond_to(*methods) ⇒ Object
- #respond_to_all?(*methods) ⇒ Boolean
- #responds_to(*methods) ⇒ Object
Instance Method Details
#does_not_respond_to(*methods) ⇒ Object
16 17 18 |
# File 'lib/remotable/core_ext/object.rb', line 16 def does_not_respond_to(*methods) methods.flatten - self.responds_to(methods) end |
#respond_to_all?(*methods) ⇒ Boolean
6 7 8 9 |
# File 'lib/remotable/core_ext/object.rb', line 6 def respond_to_all?(*methods) respond_to = method(:respond_to?) methods.flatten.all?(&respond_to) end |
#responds_to(*methods) ⇒ Object
11 12 13 14 |
# File 'lib/remotable/core_ext/object.rb', line 11 def responds_to(*methods) respond_to = method(:respond_to?) methods.flatten.select(&respond_to) end |