Class: Rubinius::ToolSet.current::TS::AST::SplatValue
- Defined in:
- lib/rubinius/ast/values.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, value) ⇒ SplatValue
constructor
A new instance of SplatValue.
- #splat? ⇒ Boolean
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
#initialize(line, value) ⇒ SplatValue
Returns a new instance of SplatValue.
8 9 10 11 |
# File 'lib/rubinius/ast/values.rb', line 8 def initialize(line, value) @line = line @value = value end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/rubinius/ast/values.rb', line 6 def value @value end |
Instance Method Details
#bytecode(g) ⇒ Object
13 14 15 16 |
# File 'lib/rubinius/ast/values.rb', line 13 def bytecode(g) @value.bytecode(g) g.cast_array unless @value.kind_of? ArrayLiteral end |
#splat? ⇒ Boolean
22 23 24 |
# File 'lib/rubinius/ast/values.rb', line 22 def splat? true end |
#to_sexp ⇒ Object
18 19 20 |
# File 'lib/rubinius/ast/values.rb', line 18 def to_sexp [:splat, @value.to_sexp] end |