Class: UdonParser::UNode
- Inherits:
-
Object
- Object
- UdonParser::UNode
- Defined in:
- lib/udon/udon_parser.rb
Instance Attribute Summary collapse
-
#a ⇒ Object
Returns the value of attribute a.
-
#c ⇒ Object
Returns the value of attribute c.
-
#m ⇒ Object
Returns the value of attribute m.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #<<(val) ⇒ Object
- #[](key) ⇒ Object
-
#initialize(params = {}) ⇒ UNode
constructor
A new instance of UNode.
- #into(val) ⇒ Object
- #into!(val) ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ UNode
Returns a new instance of UNode.
48 49 50 51 52 53 54 55 |
# File 'lib/udon/udon_parser.rb', line 48 def initialize(params={}) @m = params.delete(:m) || UHash.new @m[:sline] ||= params.delete(:sline) @m[:schr] ||= params.delete(:schr) @a= params.delete(:a) || UHash.new @c= params.delete(:c) || [] @name = params.delete(:name) end |
Instance Attribute Details
#a ⇒ Object
Returns the value of attribute a.
47 48 49 |
# File 'lib/udon/udon_parser.rb', line 47 def a @a end |
#c ⇒ Object
Returns the value of attribute c.
47 48 49 |
# File 'lib/udon/udon_parser.rb', line 47 def c @c end |
#m ⇒ Object
Returns the value of attribute m.
47 48 49 |
# File 'lib/udon/udon_parser.rb', line 47 def m @m end |
#name ⇒ Object
Returns the value of attribute name.
47 48 49 |
# File 'lib/udon/udon_parser.rb', line 47 def name @name end |
Instance Method Details
#<<(val) ⇒ Object
58 |
# File 'lib/udon/udon_parser.rb', line 58 def <<(val) @c<<val end |
#[](key) ⇒ Object
59 |
# File 'lib/udon/udon_parser.rb', line 59 def [](key) @c[key] end |
#into(val) ⇒ Object
57 |
# File 'lib/udon/udon_parser.rb', line 57 def into(val) val << self end |
#into!(val) ⇒ Object
56 |
# File 'lib/udon/udon_parser.rb', line 56 def into!(val) val << self end |