Class: Melbourne::AST::DynamicString

Inherits:
StringLiteral show all
Defined in:
lib/melbourne/ast/literals.rb

Overview

A dynamic string literal as in:

"some #{a}"

Direct Known Subclasses

DynamicExecuteString, DynamicRegex, DynamicSymbol

Instance Attribute Summary collapse

Attributes inherited from StringLiteral

#string

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, str, array) ⇒ DynamicString

Returns a new instance of DynamicString.



216
217
218
219
220
# File 'lib/melbourne/ast/literals.rb', line 216

def initialize(line, str, array)
  @line = line
  @string = str
  @array = array
end

Instance Attribute Details

#arrayObject

The parts of the dynamic string literal



212
213
214
# File 'lib/melbourne/ast/literals.rb', line 212

def array
  @array
end

#optionsObject

Returns the value of attribute options.



214
215
216
# File 'lib/melbourne/ast/literals.rb', line 214

def options
  @options
end