class JustShogi::InvalidPromotionError

InvalidPromotionError

An invalid promotion error with a message

Public Class Methods

new(message="This piece cannot promote.") click to toggle source

New invalid promotion errors can be instantiated with

@option [String] message

the message to display.

Example:

# Instantiates a new InvalidPromotionError
JustShogi::InvalidPromotionError.new("Custom Message")
Calls superclass method JustShogi::Error::new
# File lib/just_shogi/errors/invalid_promotion_error.rb, line 18
def initialize(message="This piece cannot promote.")
  super
end