Class: LazyMethods::MethodSignature

Inherits:
Object
  • Object
show all
Defined in:
lib/lazy_methods/lazy_methods.rb

Overview

This class is used to keep track of methods being called.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj, method) ⇒ MethodSignature

Returns a new instance of MethodSignature.



38
39
40
41
# File 'lib/lazy_methods/lazy_methods.rb', line 38

def initialize (obj, method)
  @object = obj
  @method = method
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



36
37
38
# File 'lib/lazy_methods/lazy_methods.rb', line 36

def method
  @method
end

#objectObject (readonly)

Returns the value of attribute object.



36
37
38
# File 'lib/lazy_methods/lazy_methods.rb', line 36

def object
  @object
end

Instance Method Details

#eql?(sig) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/lazy_methods/lazy_methods.rb', line 43

def eql? (sig)
  sig.kind_of(MethodSignature) and sig.object == @object and sig.method == @method
end