Exception: Sunniesnow::Charter::TipPointError
- Inherits:
-
StandardError
- Object
- StandardError
- Sunniesnow::Charter::TipPointError
- Defined in:
- lib/sscharter.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*expected_state, actual_state) ⇒ TipPointError
constructor
A new instance of TipPointError.
Constructor Details
#initialize(*expected_state, actual_state) ⇒ TipPointError
Returns a new instance of TipPointError.
20 21 22 |
# File 'lib/sscharter.rb', line 20 def initialize *expected_state, actual_state super "wrong tip point state: expected #{expected_state.join ' or '}, got #{actual_state}" end |
Class Method Details
.ensure(state, *expected) ⇒ Object
24 25 26 |
# File 'lib/sscharter.rb', line 24 def self.ensure state, *expected raise self.new *expected, state unless expected.include? state end |