Exception: FieldUnavailableException
- Inherits:
-
StandardError
- Object
- StandardError
- FieldUnavailableException
- Defined in:
- lib/software_challenge_client/field_unavailable_exception.rb
Overview
Exception indicating that a requested field does not exist.
Instance Attribute Summary collapse
-
#x ⇒ Integer
readonly
The X-coordinate of the requested field.
-
#y ⇒ Integer
readonly
The Y-coordinate of the requested field.
Instance Method Summary collapse
-
#initialize(x, y) ⇒ FieldUnavailableException
constructor
A new instance of FieldUnavailableException.
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
#x ⇒ Integer (readonly)
Returns 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 |
#y ⇒ Integer (readonly)
Returns 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 |