Class: MockObject
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ MockObject
constructor
A new instance of MockObject.
Constructor Details
#initialize(name, options = {}) ⇒ MockObject
Returns a new instance of MockObject.
2 3 4 5 |
# File 'lib/extensions/mspec/mspec/mocks/proxy.rb', line 2 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 (private)
7 8 9 |
# File 'lib/extensions/mspec/mspec/mocks/proxy.rb', line 7 def method_missing(sym, *args, &block) @null ? self : super end |