Class: Chelsy::IndexDesignator
- Inherits:
-
Designator
- Object
- Node
- Element
- Designator
- Chelsy::IndexDesignator
- Defined in:
- lib/chelsy/ast.rb
Overview
{ [1] = 10, [2] = 20, ...}
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(index, **rest) ⇒ IndexDesignator
constructor
A new instance of IndexDesignator.
Constructor Details
#initialize(index, **rest) ⇒ IndexDesignator
Returns a new instance of IndexDesignator.
202 203 204 205 |
# File 'lib/chelsy/ast.rb', line 202 def initialize(index, **rest) @index = Syntax::Expr.ensure(index) super **rest end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
200 201 202 |
# File 'lib/chelsy/ast.rb', line 200 def index @index end |