class JustChess::InvalidPromotionError

InvalidPromotionError

An invalid promotion error with a message

Public Class Methods

new(message="Promotion is invalid.") click to toggle source

New invalid promotion errors can be instantiated with

@option [String] message

the message to display.

Example:

# Instantiates a new InvalidPromotionError
JustChess::InvalidPromotionError.new("Custom Message")
Calls superclass method JustChess::Error::new
# File lib/just_chess/errors/invalid_promotion_error.rb, line 18
def initialize(message="Promotion is invalid.")
  super
end