Class: GuidedPath::GotoNode
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ GotoNode
constructor
A new instance of GotoNode.
- #to_hash ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ GotoNode
Returns a new instance of GotoNode.
8 9 10 11 12 |
# File 'lib/guided_path/goto_node.rb', line 8 def initialize(args = {}) super args = args.symbolize_keys raise("Must specify target for a goto node") if @next_node.empty? end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 |
# File 'lib/guided_path/goto_node.rb', line 15 def to_hash output = {} output = super output[:type] = 'goto' output end |