Class: Gimme::TestDouble
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(cls = nil) ⇒ TestDouble
Returns a new instance of TestDouble.
12
13
14
|
# File 'lib/gimme/test_double.rb', line 12
def initialize(cls=nil)
@cls = cls
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
Instance Attribute Details
#cls ⇒ Object
Returns the value of attribute cls.
10
11
12
|
# File 'lib/gimme/test_double.rb', line 10
def cls
@cls
end
|
Instance Method Details
#==(other) ⇒ Object
30
31
32
|
# File 'lib/gimme/test_double.rb', line 30
def ==(other)
eql?(other)
end
|
#eql?(other) ⇒ Boolean
26
27
28
|
# File 'lib/gimme/test_double.rb', line 26
def eql?(other)
__id__ == other.__id__
end
|
#hash ⇒ Object
22
23
24
|
# File 'lib/gimme/test_double.rb', line 22
def hash
__id__
end
|