Class: BusinessFlow::Step::Options
- Inherits:
-
Struct
- Object
- Struct
- BusinessFlow::Step::Options
- Defined in:
- lib/business_flow/step.rb
Overview
Responsible for creating objects based on our input options
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts
171 172 173 |
# File 'lib/business_flow/step.rb', line 171 def opts @opts end |
Instance Method Details
#condition ⇒ Object
183 184 185 186 187 188 189 |
# File 'lib/business_flow/step.rb', line 183 def condition opts.fetch(:condition) do if_stmts = opts[:if] unless_stmts = opts[:unless] ConditionList.new(if_stmts, unless_stmts) if if_stmts.present? || unless_stmts.present? end end |
#input_object ⇒ Object
172 173 174 175 |
# File 'lib/business_flow/step.rb', line 172 def input_object inputs = opts[:inputs] inputs.present? ? Inputs.new(inputs) : nil end |
#result_factory ⇒ Object
177 178 179 180 181 |
# File 'lib/business_flow/step.rb', line 177 def result_factory ResultFactory.new(opts[:outputs], opts[:output], opts[:default_output]) end |