Class: Cyclotone::MiniNotation::AST::Slow
- Defined in:
- lib/cyclotone/mini_notation/ast.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(pattern:, amount:) ⇒ Slow
constructor
A new instance of Slow.
- #to_h ⇒ Object
Methods inherited from Node
#==, deep_freeze, #hash, #to_mn
Constructor Details
#initialize(pattern:, amount:) ⇒ Slow
Returns a new instance of Slow.
135 136 137 138 139 140 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 135 def initialize(pattern:, amount:) super() @pattern = pattern @amount = amount freeze end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
133 134 135 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 133 def amount @amount end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
133 134 135 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 133 def pattern @pattern end |
Instance Method Details
#to_h ⇒ Object
142 143 144 |
# File 'lib/cyclotone/mini_notation/ast.rb', line 142 def to_h { pattern: pattern, amount: amount } end |