Class: Pedalboard::Components::Pot
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Pedalboard::Components::Pot
- Defined in:
- lib/pedalboard/components/pot.rb
Constant Summary collapse
- TOLERANCE =
2
- UPPER_LIMIT =
127
- LOWER_LIMIT =
0
Instance Attribute Summary collapse
-
#change ⇒ Object
readonly
Returns the value of attribute change.
-
#inverted ⇒ Object
readonly
Returns the value of attribute inverted.
-
#lower_limit ⇒ Object
readonly
Returns the value of attribute lower_limit.
-
#tolerance ⇒ Object
readonly
Returns the value of attribute tolerance.
-
#upper_limit ⇒ Object
readonly
Returns the value of attribute upper_limit.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from BaseComponent
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Pot
constructor
A new instance of Pot.
Constructor Details
#initialize(opts = {}) ⇒ Pot
Returns a new instance of Pot.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pedalboard/components/pot.rb', line 19 def initialize opts={} super opts @change = opts.fetch(:change) { ->(value) {} } @lower_limit = opts.fetch(:lower_limit) { LOWER_LIMIT } @upper_limit = opts.fetch(:upper_limit) { UPPER_LIMIT } @tolerance = opts.fetch(:tolerance) { TOLERANCE } @inverted = opts.fetch(:inverted) { false } @value = lower_limit configure_dino_component end |
Instance Attribute Details
#change ⇒ Object (readonly)
Returns the value of attribute change.
13 14 15 |
# File 'lib/pedalboard/components/pot.rb', line 13 def change @change end |
#inverted ⇒ Object (readonly)
Returns the value of attribute inverted.
13 14 15 |
# File 'lib/pedalboard/components/pot.rb', line 13 def inverted @inverted end |
#lower_limit ⇒ Object (readonly)
Returns the value of attribute lower_limit.
13 14 15 |
# File 'lib/pedalboard/components/pot.rb', line 13 def lower_limit @lower_limit end |
#tolerance ⇒ Object (readonly)
Returns the value of attribute tolerance.
13 14 15 |
# File 'lib/pedalboard/components/pot.rb', line 13 def tolerance @tolerance end |
#upper_limit ⇒ Object (readonly)
Returns the value of attribute upper_limit.
13 14 15 |
# File 'lib/pedalboard/components/pot.rb', line 13 def upper_limit @upper_limit end |
#value ⇒ Object
Returns the value of attribute value.
17 18 19 |
# File 'lib/pedalboard/components/pot.rb', line 17 def value @value end |