Class: Goby::Location
- Inherits:
-
Object
- Object
- Goby::Location
- Defined in:
- lib/goby/util.rb
Overview
The combination of a map and y-x coordinates, which determine a specific position/location on the map.
Instance Attribute Summary collapse
-
#coords ⇒ Object
readonly
Returns the value of attribute coords.
-
#map ⇒ Object
readonly
Returns the value of attribute map.
Instance Method Summary collapse
-
#initialize(map, coords) ⇒ Location
constructor
Location constructor.
Constructor Details
#initialize(map, coords) ⇒ Location
Location constructor.
42 43 44 45 |
# File 'lib/goby/util.rb', line 42 def initialize(map, coords) @map = map @coords = coords end |
Instance Attribute Details
#coords ⇒ Object (readonly)
Returns the value of attribute coords.
47 48 49 |
# File 'lib/goby/util.rb', line 47 def coords @coords end |
#map ⇒ Object (readonly)
Returns the value of attribute map.
47 48 49 |
# File 'lib/goby/util.rb', line 47 def map @map end |