Sha256: f466e3093bc8642293ef457601886dbc729277718d0369fad2bcb9e23ac927b4

Contents?: true

Size: 472 Bytes

Versions: 8

Compression:

Stored size: 472 Bytes

Contents

module JustBackgammon

  # = WrongDirectionError
  #
  # A wrong direction error with a message
  class WrongDirectionError

    # A new instance of WrongDirectionError.
    #
    # @option [String] message
    #   the message.
    #
    # ==== Example:
    #   # Instantiates a new WrongDirectionError
    #   JustBackgammon::WrongDirectionError.new("Custom Message")
    def initialize(message="A piece cannot move backwards.")
      @message = message
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
just_backgammon-1.1.0 lib/just_backgammon/errors/wrong_direction_error.rb
just_backgammon-1.0.2 lib/just_backgammon/errors/wrong_direction_error.rb
just_backgammon-1.0.1 lib/just_backgammon/errors/wrong_direction_error.rb
just_backgammon-1.0.0 lib/just_backgammon/errors/wrong_direction_error.rb
just_backgammon-0.2.0 lib/just_backgammon/errors/wrong_direction_error.rb
just_backgammon-0.1.2 lib/just_backgammon/errors/wrong_direction_error.rb
just_backgammon-0.1.1 lib/just_backgammon/errors/wrong_direction_error.rb
just_backgammon-0.1.0 lib/just_backgammon/errors/wrong_direction_error.rb