Class: JustChess::InvalidPromotionError

Inherits:
Error
  • Object
show all
Defined in:
lib/just_chess/errors/invalid_promotion_error.rb

Overview

InvalidPromotionError

An invalid promotion error with a message

Instance Method Summary collapse

Constructor Details

#initialize(message = "Promotion is invalid.") ⇒ InvalidPromotionError

New invalid promotion errors can be instantiated with

Example:

# Instantiates a new InvalidPromotionError
JustChess::InvalidPromotionError.new("Custom Message")

Parameters:

  • [String] (Hash)

    a customizable set of options



18
19
20
# File 'lib/just_chess/errors/invalid_promotion_error.rb', line 18

def initialize(message="Promotion is invalid.")
  super
end