Class: LibRubyParser::Nodes::Hash
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Hash
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents a hash literal (i.e. { foo: 42 }
)
Instance Attribute Summary collapse
-
#begin_l ⇒ Loc?
readonly
Location of the open parenthesis.
-
#end_l ⇒ Loc?
readonly
Location of the closing parenthesis.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#pairs ⇒ ::Array<Node>
readonly
A list of key-value pairs.
Instance Attribute Details
#begin_l ⇒ Loc? (readonly)
Location of the open parenthesis
{ a: 1 }
~
None
if hash literal is implicit, e.g. foo(key: "value")
1674 1675 1676 |
# File 'lib/lib-ruby-parser/nodes.rb', line 1674 def begin_l @begin_l end |
#end_l ⇒ Loc? (readonly)
Location of the closing parenthesis
{ a: 1 }
~
None
if hash literal is implicit, e.g. foo(key: "value")
1685 1686 1687 |
# File 'lib/lib-ruby-parser/nodes.rb', line 1685 def end_l @end_l end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
{ a: 1 }
~~~~~~~~
1694 1695 1696 |
# File 'lib/lib-ruby-parser/nodes.rb', line 1694 def expression_l @expression_l end |
#pairs ⇒ ::Array<Node> (readonly)
A list of key-value pairs
1663 1664 1665 |
# File 'lib/lib-ruby-parser/nodes.rb', line 1663 def pairs @pairs end |