Class: GuidedPath::LeadInNode
- Defined in:
- lib/guided_path/lead_in_node.rb
Instance Attribute Summary collapse
-
#pause ⇒ Object
readonly
Returns the value of attribute pause.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ LeadInNode
constructor
A new instance of LeadInNode.
- #to_hash ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ LeadInNode
Returns a new instance of LeadInNode.
9 10 11 12 13 14 15 16 |
# File 'lib/guided_path/lead_in_node.rb', line 9 def initialize(args = {}) super args = args.symbolize_keys raise(ArgumentError, "Must specify a value for the node") unless args[:text] @text = args[:text].to_s @pause = args[:pause].to_s end |
Instance Attribute Details
#pause ⇒ Object (readonly)
Returns the value of attribute pause.
7 8 9 |
# File 'lib/guided_path/lead_in_node.rb', line 7 def pause @pause end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
7 8 9 |
# File 'lib/guided_path/lead_in_node.rb', line 7 def text @text end |
Instance Method Details
#to_hash ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/guided_path/lead_in_node.rb', line 19 def to_hash output = super output[:type] = 'leadin' output[:text] = @text output[:pause] = @pause output end |