Class: Cyclotone::MiniNotation::AST::Alternating
- 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:) ⇒ Alternating
constructor
A new instance of Alternating.
- #to_h ⇒ Object
Methods inherited from Node
#==, deep_freeze, #hash, #to_mn
Constructor Details
#initialize(patterns:) ⇒ Alternating
Returns a new instance of Alternating.
91 92 93 94 95 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 91 def initialize(patterns:) super() @patterns = Node.deep_freeze(patterns) freeze end |
Instance Attribute Details
#patterns ⇒ Object (readonly)
Returns the value of attribute patterns.
89 90 91 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 89 def patterns @patterns end |
Instance Method Details
#to_h ⇒ Object
97 98 99 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 97 def to_h { patterns: patterns } end |