Class: XapTreetop::KeyValuePair
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- XapTreetop::KeyValuePair
- Defined in:
- lib/xap/parser/xap_nodes.rb
Instance Method Summary collapse
Instance Method Details
#is_hex? ⇒ Boolean
45 46 47 |
# File 'lib/xap/parser/xap_nodes.rb', line 45 def is_hex? value.val.is_a? HexValue end |
#key ⇒ Object
26 27 28 |
# File 'lib/xap/parser/xap_nodes.rb', line 26 def key keyword.text_value end |
#to_s ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/xap/parser/xap_nodes.rb', line 34 def to_s s = "#{key}" if is_hex? s << '!' else s << '=' end s << value.val.text_value s end |
#val ⇒ Object
30 31 32 |
# File 'lib/xap/parser/xap_nodes.rb', line 30 def val value.val.raw_value end |