Exception: Voicemeeter::Errors::OutOfBoundsErrors
- Inherits:
-
VMRemoteErrors
- Object
- StandardError
- VMRemoteErrors
- Voicemeeter::Errors::OutOfBoundsErrors
- Defined in:
- lib/voicemeeter/errors.rb
Instance Attribute Summary collapse
-
#range ⇒ Object
Returns the value of attribute range.
Instance Method Summary collapse
-
#initialize(range) ⇒ OutOfBoundsErrors
constructor
A new instance of OutOfBoundsErrors.
- #message ⇒ Object
Constructor Details
#initialize(range) ⇒ OutOfBoundsErrors
Returns a new instance of OutOfBoundsErrors.
28 29 30 |
# File 'lib/voicemeeter/errors.rb', line 28 def initialize(range) self.range = range end |
Instance Attribute Details
#range ⇒ Object
Returns the value of attribute range.
26 27 28 |
# File 'lib/voicemeeter/errors.rb', line 26 def range @range end |
Instance Method Details
#message ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/voicemeeter/errors.rb', line 32 def if @range.kind_of?(Range) "Value error, expected value in range (#{range.first}..#{range.last})" elsif @range.kind_of?(Array) "Value error, expected one of: #{@range}" else "Value error, expected #{@range}" end end |