Class: OpenTopo::Point
- Inherits:
-
Object
- Object
- OpenTopo::Point
- Defined in:
- lib/open_topo/point.rb
Instance Attribute Summary collapse
-
#heigh ⇒ Object
(also: #elevation)
readonly
Returns the value of attribute heigh.
-
#lat ⇒ Object
(also: #latitude)
readonly
Returns the value of attribute lat.
-
#long ⇒ Object
(also: #longitude)
readonly
Returns the value of attribute long.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize(long:, lat:, heigh: nil, unit: "m") ⇒ Point
constructor
A new instance of Point.
Constructor Details
#initialize(long:, lat:, heigh: nil, unit: "m") ⇒ Point
Returns a new instance of Point.
17 18 19 20 21 22 |
# File 'lib/open_topo/point.rb', line 17 def initialize(long:, lat:, heigh: nil, unit: "m") @long = long @lat = lat @heigh = heigh @unit = unit end |
Instance Attribute Details
#heigh ⇒ Object (readonly) Also known as: elevation
Returns the value of attribute heigh.
12 13 14 |
# File 'lib/open_topo/point.rb', line 12 def heigh @heigh end |
#lat ⇒ Object (readonly) Also known as: latitude
Returns the value of attribute lat.
9 10 11 |
# File 'lib/open_topo/point.rb', line 9 def lat @lat end |
#long ⇒ Object (readonly) Also known as: longitude
Returns the value of attribute long.
6 7 8 |
# File 'lib/open_topo/point.rb', line 6 def long @long end |
#unit ⇒ Object (readonly)
Returns the value of attribute unit.
15 16 17 |
# File 'lib/open_topo/point.rb', line 15 def unit @unit end |