Class: JustBackgammon::EmptyBarError

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

Overview

EmptyBarError

An empty bar error with a message

Instance Method Summary collapse

Constructor Details

#initialize(message = "No pieces owned by player on bar.") ⇒ EmptyBarError

A new instance of EmptyBarError.

Example:

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

Parameters:

  • [String] (Hash)

    a customizable set of options



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

def initialize(message="No pieces owned by player on bar.")
  @message = message
end