Class: EA::AreaLookup::Coordinates
- Inherits:
-
Object
- Object
- EA::AreaLookup::Coordinates
- Defined in:
- lib/ea/area_lookup/coordinates.rb
Instance Attribute Summary collapse
-
#easting ⇒ Object
(also: #x)
Returns the value of attribute easting.
-
#northing ⇒ Object
(also: #y)
Returns the value of attribute northing.
Instance Method Summary collapse
-
#initialize(easting:, northing:) ⇒ Coordinates
constructor
A new instance of Coordinates.
- #valid? ⇒ Boolean
Constructor Details
#initialize(easting:, northing:) ⇒ Coordinates
Returns a new instance of Coordinates.
8 9 10 11 |
# File 'lib/ea/area_lookup/coordinates.rb', line 8 def initialize(easting:, northing:) @easting = easting @northing = northing end |
Instance Attribute Details
#easting ⇒ Object Also known as: x
Returns the value of attribute easting.
4 5 6 |
# File 'lib/ea/area_lookup/coordinates.rb', line 4 def easting @easting end |
#northing ⇒ Object Also known as: y
Returns the value of attribute northing.
4 5 6 |
# File 'lib/ea/area_lookup/coordinates.rb', line 4 def northing @northing end |
Instance Method Details
#valid? ⇒ Boolean
13 14 15 |
# File 'lib/ea/area_lookup/coordinates.rb', line 13 def valid? easting && northing end |