Class: AskAwesomely::LogicJump
- Inherits:
-
Object
- Object
- AskAwesomely::LogicJump
- Includes:
- JsonBuilder
- Defined in:
- lib/ask_awesomely/logic_jump.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(args) ⇒ LogicJump
constructor
A new instance of LogicJump.
Methods included from JsonBuilder
Constructor Details
#initialize(args) ⇒ LogicJump
Returns a new instance of LogicJump.
8 9 10 11 12 13 14 |
# File 'lib/ask_awesomely/logic_jump.rb', line 8 def initialize(args) @state = OpenStruct.new( to: args[:to], from: args[:from], if: args.key?(:if) ? args[:if] : args[:if_answer] ) end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/ask_awesomely/logic_jump.rb', line 6 def state @state end |