Class: MockIntObject
- Defined in:
- lib/extensions/mspec/mspec/mocks/proxy.rb
Instance Attribute Summary collapse
-
#calls ⇒ Object
readonly
Returns the value of attribute calls.
Instance Method Summary collapse
- #count ⇒ Object
-
#initialize(val) ⇒ MockIntObject
constructor
A new instance of MockIntObject.
- #to_int ⇒ Object
Constructor Details
#initialize(val) ⇒ MockIntObject
Returns a new instance of MockIntObject.
28 29 30 31 32 33 34 35 36 |
# File 'lib/extensions/mspec/mspec/mocks/proxy.rb', line 28 def initialize(val) @value = val @calls = 0 key = [self, :to_int] Mock.objects[key] = self Mock.mocks[key] << self end |
Instance Attribute Details
#calls ⇒ Object (readonly)
Returns the value of attribute calls.
38 39 40 |
# File 'lib/extensions/mspec/mspec/mocks/proxy.rb', line 38 def calls @calls end |