Class: JustChess::Error
- Inherits:
-
Object
- Object
- JustChess::Error
- Defined in:
- lib/just_chess/errors/error.rb
Overview
Error
An error with a message
Direct Known Subclasses
CausesCheckError, InvalidMoveError, InvalidPromotionError, MovedIntoCheckError, NoPieceError, NotPlayersTurnError, OffBoardError
Instance Method Summary collapse
-
#initialize(message = "Generic Error") ⇒ Error
constructor
New errors can be instantiated with.
Constructor Details
#initialize(message = "Generic Error") ⇒ Error
New errors can be instantiated with
Example:
# Instantiates a new Error
JustChess::Error.new("Custom Message")
16 17 18 |
# File 'lib/just_chess/errors/error.rb', line 16 def initialize(="Generic Error") = end |