Class: Smartdown::Parser::FlowInterpreter
- Inherits:
-
Object
- Object
- Smartdown::Parser::FlowInterpreter
- Defined in:
- lib/smartdown/parser/flow_interpreter.rb
Instance Attribute Summary collapse
-
#data_module ⇒ Object
readonly
Returns the value of attribute data_module.
-
#flow_input ⇒ Object
readonly
Returns the value of attribute flow_input.
Instance Method Summary collapse
-
#initialize(flow_input, data_module = nil) ⇒ FlowInterpreter
constructor
A new instance of FlowInterpreter.
- #interpret ⇒ Object
Constructor Details
#initialize(flow_input, data_module = nil) ⇒ FlowInterpreter
Returns a new instance of FlowInterpreter.
23 24 25 26 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 23 def initialize(flow_input, data_module=nil) @flow_input = pre_parse(flow_input) @data_module = data_module end |
Instance Attribute Details
#data_module ⇒ Object (readonly)
Returns the value of attribute data_module.
21 22 23 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 21 def data_module @data_module end |
#flow_input ⇒ Object (readonly)
Returns the value of attribute flow_input.
21 22 23 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 21 def flow_input @flow_input end |
Instance Method Details
#interpret ⇒ Object
28 29 30 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 28 def interpret Smartdown::Model::Flow.new(coversheet.name, [coversheet] + questions + outcomes) end |