Class: MethodObject::PotentialDelegator
- Inherits:
-
Struct
- Object
- Struct
- MethodObject::PotentialDelegator
- Defined in:
- lib/method_object.rb
Overview
Represents a possible match of the form:
some_method => my_attribute.some_method
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#delegated_method ⇒ Object
(also: #method_to_call_on_delegate)
Returns the value of attribute delegated_method.
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute
97 98 99 |
# File 'lib/method_object.rb', line 97 def attribute @attribute end |
#delegated_method ⇒ Object Also known as: method_to_call_on_delegate
Returns the value of attribute delegated_method
97 98 99 |
# File 'lib/method_object.rb', line 97 def delegated_method @delegated_method end |
#object ⇒ Object
Returns the value of attribute object
97 98 99 |
# File 'lib/method_object.rb', line 97 def object @object end |
Instance Method Details
#candidate? ⇒ Boolean
98 99 100 |
# File 'lib/method_object.rb', line 98 def candidate? object.respond_to?(delegated_method) end |