Class: OpenTopo::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/open_topo/point.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#heighObject (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

#latObject (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

#longObject (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

#unitObject (readonly)

Returns the value of attribute unit.



15
16
17
# File 'lib/open_topo/point.rb', line 15

def unit
  @unit
end