Exception: InvalidMoveException
- Inherits:
-
StandardError
- Object
- StandardError
- InvalidMoveException
- Defined in:
- lib/software_challenge_client/invalid_move_exception.rb
Overview
Exception indicating a move which was performed is not valid for the given state.
Instance Method Summary collapse
-
#initialize(msg, move_or_action) ⇒ InvalidMoveException
constructor
A new instance of InvalidMoveException.
- #message ⇒ Object
Constructor Details
#initialize(msg, move_or_action) ⇒ InvalidMoveException
Returns a new instance of InvalidMoveException.
6 7 8 9 10 11 |
# File 'lib/software_challenge_client/invalid_move_exception.rb', line 6 def initialize(msg, move_or_action) # This exception will be thrown by a move or by an individual action, # depending where the rule violation was detected. @move_or_action = move_or_action super(msg) end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'lib/software_challenge_client/invalid_move_exception.rb', line 13 def "#{super}: #{@move_or_action}" end |