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.
82 83 84 85 |
# File 'lib/kapusta/ast.rb', line 82 def initialize(items) @items = items @multiline_source = false end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
80 81 82 |
# File 'lib/kapusta/ast.rb', line 80 def column @column end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
79 80 81 |
# File 'lib/kapusta/ast.rb', line 79 def items @items end |
#line ⇒ Object
Returns the value of attribute line.
80 81 82 |
# File 'lib/kapusta/ast.rb', line 80 def line @line end |
#multiline_source ⇒ Object
Returns the value of attribute multiline_source.
80 81 82 |
# File 'lib/kapusta/ast.rb', line 80 def multiline_source @multiline_source end |
Instance Method Details
#inspect ⇒ Object
91 92 93 |
# File 'lib/kapusta/ast.rb', line 91 def inspect "[#{@items.map(&:inspect).join(' ')}]" end |
#to_ary ⇒ Object
87 88 89 |
# File 'lib/kapusta/ast.rb', line 87 def to_ary @items end |