Class: JustBackgammon::BearOffError

Inherits:
Object
  • Object
show all
Defined in:
lib/just_backgammon/errors/bear_off_error.rb

Overview

BearOffError

A bear off error with a message

Instance Method Summary collapse

Constructor Details

#initialize(message = "Cannot bear off while pieces are not home.") ⇒ BearOffError

A new instance of BearOffError.

Example:

# Instantiates a new BearOffError
JustBackgammon::BearOffError.new("Custom Message")

Parameters:

  • [String] (Hash)

    a customizable set of options



16
17
18
# File 'lib/just_backgammon/errors/bear_off_error.rb', line 16

def initialize(message="Cannot bear off while pieces are not home.")
  @message = message
end