Class: Cyclotone::MiniNotation::AST::Slow

Inherits:
Node
  • Object
show all
Defined in:
lib/cyclotone/mini_notation/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#amountObject (readonly)

Returns the value of attribute amount.



133
134
135
# File 'lib/cyclotone/mini_notation/ast.rb', line 133

def amount
  @amount
end

#patternObject (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_hObject



142
143
144
# File 'lib/cyclotone/mini_notation/ast.rb', line 142

def to_h
  { pattern: pattern, amount: amount }
end