Class: Cyclotone::MiniNotation::AST::Stack
- Defined in:
- lib/cyclotone/mini_notation/ast.rb
Instance Attribute Summary collapse
-
#patterns ⇒ Object
readonly
Returns the value of attribute patterns.
Instance Method Summary collapse
-
#initialize(patterns:) ⇒ Stack
constructor
A new instance of Stack.
- #to_h ⇒ Object
Methods inherited from Node
#==, deep_freeze, #hash, #to_mn
Constructor Details
#initialize(patterns:) ⇒ Stack
Returns a new instance of Stack.
77 78 79 80 81 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 77 def initialize(patterns:) super() @patterns = Node.deep_freeze(patterns) freeze end |
Instance Attribute Details
#patterns ⇒ Object (readonly)
Returns the value of attribute patterns.
75 76 77 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 75 def patterns @patterns end |
Instance Method Details
#to_h ⇒ Object
83 84 85 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 83 def to_h { patterns: patterns } end |