Class: Kapusta::Vec
- Inherits:
-
Object
- Object
- Kapusta::Vec
- Defined in:
- lib/kapusta/ast.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#line ⇒ Object
Returns the value of attribute line.
-
#multiline_source ⇒ Object
Returns the value of attribute multiline_source.
Instance Method Summary collapse
-
#initialize(items) ⇒ Vec
constructor
A new instance of Vec.
- #inspect ⇒ Object
- #to_ary ⇒ Object
Constructor Details
#initialize(items) ⇒ Vec
Returns a new instance of Vec.
90 91 92 93 |
# File 'lib/kapusta/ast.rb', line 90 def initialize(items) @items = items @multiline_source = false end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
88 89 90 |
# File 'lib/kapusta/ast.rb', line 88 def column @column end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
87 88 89 |
# File 'lib/kapusta/ast.rb', line 87 def items @items end |
#line ⇒ Object
Returns the value of attribute line.
88 89 90 |
# File 'lib/kapusta/ast.rb', line 88 def line @line end |
#multiline_source ⇒ Object
Returns the value of attribute multiline_source.
88 89 90 |
# File 'lib/kapusta/ast.rb', line 88 def multiline_source @multiline_source end |
Instance Method Details
#inspect ⇒ Object
99 100 101 |
# File 'lib/kapusta/ast.rb', line 99 def inspect "[#{@items.map(&:inspect).join(' ')}]" end |
#to_ary ⇒ Object
95 96 97 |
# File 'lib/kapusta/ast.rb', line 95 def to_ary @items end |