Class: RubyODE::UseCase
- Inherits:
-
Object
- Object
- RubyODE::UseCase
- Defined in:
- lib/ruby_ode/runtime.rb
Instance Method Summary collapse
- #execute(_param) ⇒ Object
- #guard(_param) ⇒ Object
- #on_error(error) ⇒ Object
- #on_result(result) ⇒ Object
- #process(param) ⇒ Object
Instance Method Details
#execute(_param) ⇒ Object
50 51 52 |
# File 'lib/ruby_ode/runtime.rb', line 50 def execute(_param) raise NotImplementedError end |
#guard(_param) ⇒ Object
48 |
# File 'lib/ruby_ode/runtime.rb', line 48 def guard(_param); end |
#on_error(error) ⇒ Object
58 59 60 |
# File 'lib/ruby_ode/runtime.rb', line 58 def on_error(error) Outputs.error(error) end |
#on_result(result) ⇒ Object
54 55 56 |
# File 'lib/ruby_ode/runtime.rb', line 54 def on_result(result) Outputs.value(result) end |
#process(param) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/ruby_ode/runtime.rb', line 41 def process(param) guard(param) on_result(execute(param)) rescue StandardError => error on_error(error) end |