class GuidedPath::TextNode
Attributes
value[R]
Public Class Methods
new(args = {})
click to toggle source
Calls superclass method
GuidedPath::Node::new
# File lib/guided_path/text_node.rb, line 9 def initialize(args = {}) super args = args.symbolize_keys raise(ArgumentError, "Must specify a value for the node") unless args[:value] @value = args[:value].to_s end
Public Instance Methods
to_hash()
click to toggle source
Calls superclass method
GuidedPath::Node#to_hash
# File lib/guided_path/text_node.rb, line 18 def to_hash output = super output[:type] = 'text' output[:value] = @value output end