Class: Bogus::UndefinedReturnValue
- Inherits:
-
Object
- Object
- Bogus::UndefinedReturnValue
show all
- Defined in:
- lib/bogus/stubbing/undefined_return_value.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of UndefinedReturnValue.
3
4
5
|
# File 'lib/bogus/stubbing/undefined_return_value.rb', line 3
def initialize(interaction)
@interaction = InteractionPresenter.new(interaction)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
11
12
13
|
# File 'lib/bogus/stubbing/undefined_return_value.rb', line 11
def method_missing(name, *args, &block)
raise NoMethodError, "undefined method '#{name}' for #{self}"
end
|
Class Method Details
.undefined?(value) ⇒ Boolean
15
16
17
|
# File 'lib/bogus/stubbing/undefined_return_value.rb', line 15
def self.undefined?(value)
value.is_a?(self)
end
|
Instance Method Details
#to_s ⇒ Object
7
8
9
|
# File 'lib/bogus/stubbing/undefined_return_value.rb', line 7
def to_s
"#<UndefinedReturnValue for #{@interaction}>"
end
|