Class: LazyMethods::MethodSignature
- Inherits:
-
Object
- Object
- LazyMethods::MethodSignature
- Defined in:
- lib/lazy_methods/lazy_methods.rb
Overview
This class is used to keep track of methods being called.
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #eql?(sig) ⇒ Boolean
-
#initialize(obj, method) ⇒ MethodSignature
constructor
A new instance of MethodSignature.
Constructor Details
#initialize(obj, method) ⇒ MethodSignature
Returns a new instance of MethodSignature.
43 44 45 46 |
# File 'lib/lazy_methods/lazy_methods.rb', line 43 def initialize (obj, method) @object = obj @method = method end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
41 42 43 |
# File 'lib/lazy_methods/lazy_methods.rb', line 41 def method @method end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
41 42 43 |
# File 'lib/lazy_methods/lazy_methods.rb', line 41 def object @object end |
Instance Method Details
#eql?(sig) ⇒ Boolean
48 49 50 |
# File 'lib/lazy_methods/lazy_methods.rb', line 48 def eql? (sig) sig.kind_of(MethodSignature) && sig.object == @object && sig.method == @method end |