Class: Rubinius::AST::DynamicString
- Inherits:
-
StringLiteral
- Object
- Node
- StringLiteral
- Rubinius::AST::DynamicString
- Defined in:
- lib/compiler/ast/literals.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#array ⇒ Object
Returns the value of attribute array.
-
#options ⇒ Object
Returns the value of attribute options.
Attributes inherited from StringLiteral
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, str, array) ⇒ DynamicString
constructor
A new instance of DynamicString.
- #sexp_name ⇒ Object
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, str, array) ⇒ DynamicString
Returns a new instance of DynamicString.
157 158 159 160 161 |
# File 'lib/compiler/ast/literals.rb', line 157 def initialize(line, str, array) @line = line @string = str @array = array end |
Instance Attribute Details
#array ⇒ Object
Returns the value of attribute array.
155 156 157 |
# File 'lib/compiler/ast/literals.rb', line 155 def array @array end |
#options ⇒ Object
Returns the value of attribute options.
155 156 157 |
# File 'lib/compiler/ast/literals.rb', line 155 def @options end |
Instance Method Details
#sexp_name ⇒ Object
163 164 165 |
# File 'lib/compiler/ast/literals.rb', line 163 def sexp_name :dstr end |
#to_sexp ⇒ Object
167 168 169 |
# File 'lib/compiler/ast/literals.rb', line 167 def to_sexp @array.inject([sexp_name, @string]) { |s, x| s << x.to_sexp } end |