Exception: FieldUnavailableException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/software_challenge_client/field_unavailable_exception.rb

Overview

Exception indicating that a requested field does not exist.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ FieldUnavailableException

Returns a new instance of FieldUnavailableException.



12
13
14
15
16
# File 'lib/software_challenge_client/field_unavailable_exception.rb', line 12

def initialize(x, y)
  super("Field with coordinates (#{x},#{y}) is not available.")
  @x = x
  @y = y
end

Instance Attribute Details

#xInteger (readonly)

Returns the X-coordinate of the requested field.

Returns:

  • (Integer)

    the X-coordinate of the requested field.



6
7
8
# File 'lib/software_challenge_client/field_unavailable_exception.rb', line 6

def x
  @x
end

#yInteger (readonly)

Returns the Y-coordinate of the requested field.

Returns:

  • (Integer)

    the Y-coordinate of the requested field.



10
11
12
# File 'lib/software_challenge_client/field_unavailable_exception.rb', line 10

def y
  @y
end