Class: Rohbau::Interface::Caller
- Inherits:
-
Object
- Object
- Rohbau::Interface::Caller
- Defined in:
- lib/rohbau/interface.rb
Instance Method Summary collapse
- #call(use_case, args, options = {}) ⇒ Object
-
#initialize(domain) ⇒ Caller
constructor
A new instance of Caller.
Constructor Details
#initialize(domain) ⇒ Caller
Returns a new instance of Caller.
79 80 81 |
# File 'lib/rohbau/interface.rb', line 79 def initialize(domain) @domain = validate_and_return!(domain) end |
Instance Method Details
#call(use_case, args, options = {}) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/rohbau/interface.rb', line 83 def call(use_case, args, = {}) type = [:stub_type] stubbed_result = [:stub_result] use_case = get_use_case_for(use_case, args) if stubbed_result stub_use_case(use_case, type, stubbed_result) else call_use_case(use_case, args) end end |