Class: NumericMockObject
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ NumericMockObject
constructor
A new instance of NumericMockObject.
- #method_missing(sym, *args, &block) ⇒ Object
- #singleton_method_added(val) ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ NumericMockObject
Returns a new instance of NumericMockObject.
13 14 15 16 |
# File 'lib/mspec/mocks/proxy.rb', line 13 def initialize(name, ={}) @name = name @null = [:null_object] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
18 19 20 |
# File 'lib/mspec/mocks/proxy.rb', line 18 def method_missing(sym, *args, &block) @null ? self : super end |
Instance Method Details
#singleton_method_added(val) ⇒ Object
22 23 |
# File 'lib/mspec/mocks/proxy.rb', line 22 def singleton_method_added(val) end |