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.



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

#methodObject (readonly)

Returns the value of attribute method.



41
42
43
# File 'lib/lazy_methods/lazy_methods.rb', line 41

def method
  @method
end

#objectObject (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

Returns:

  • (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