Class: Fix::It Private
- Inherits:
-
Spectus::ExpectationTarget
- Object
- Spectus::ExpectationTarget
- Fix::It
- Defined in:
- lib/fix/it.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wraps the target of an expectation.
Instance Method Summary collapse
-
#initialize(subject, challenges, helpers) ⇒ It
constructor
private
Create a new expection target.
-
#method_missing(name, *args, &block) ⇒ Object
private
Override Ruby’s method_missing in order to provide let interface.
Constructor Details
#initialize(subject, challenges, helpers) ⇒ It
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a new expection target
14 15 16 17 18 |
# File 'lib/fix/it.rb', line 14 def initialize(subject, challenges, helpers) @subject = subject @challenges = challenges @helpers = helpers end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Override Ruby’s method_missing in order to provide let interface.
26 27 28 |
# File 'lib/fix/it.rb', line 26 def method_missing(name, *args, &block) @helpers.key?(name) ? @helpers.fetch(name).call : super end |