Class: Cyclotone::MiniNotation::AST::Sequence
- Defined in:
- lib/cyclotone/mini_notation/ast.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Instance Method Summary collapse
-
#initialize(elements:) ⇒ Sequence
constructor
A new instance of Sequence.
- #to_h ⇒ Object
Methods inherited from Node
#==, deep_freeze, #hash, #to_mn
Constructor Details
#initialize(elements:) ⇒ Sequence
Returns a new instance of Sequence.
63 64 65 66 67 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 63 def initialize(elements:) super() @elements = Node.deep_freeze(elements) freeze end |
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
61 62 63 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 61 def elements @elements end |
Instance Method Details
#to_h ⇒ Object
69 70 71 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 69 def to_h { elements: elements } end |