Class: GpxRuby::Gpx::Track::Point
- Defined in:
- lib/gpx_ruby/gpx/track.rb
Constant Summary
Constants inherited from Point
Instance Attribute Summary collapse
-
#elevation ⇒ Object
Returns the value of attribute elevation.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(params) ⇒ Point
constructor
A new instance of Point.
- #to_a ⇒ Object
Methods inherited from Point
#+, #/, #[], #distance, #to_hash, #to_s
Constructor Details
#initialize(params) ⇒ Point
Returns a new instance of Point.
49 50 51 52 53 54 |
# File 'lib/gpx_ruby/gpx/track.rb', line 49 def initialize(params) @lat = params[:lat] @lon = params[:lon] @time = params[:time] @elevation = params[:elevation] end |
Instance Attribute Details
#elevation ⇒ Object
Returns the value of attribute elevation.
47 48 49 |
# File 'lib/gpx_ruby/gpx/track.rb', line 47 def elevation @elevation end |
#lat ⇒ Object
Returns the value of attribute lat.
47 48 49 |
# File 'lib/gpx_ruby/gpx/track.rb', line 47 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
47 48 49 |
# File 'lib/gpx_ruby/gpx/track.rb', line 47 def lon @lon end |
#time ⇒ Object
Returns the value of attribute time.
47 48 49 |
# File 'lib/gpx_ruby/gpx/track.rb', line 47 def time @time end |
Instance Method Details
#to_a ⇒ Object
56 57 58 |
# File 'lib/gpx_ruby/gpx/track.rb', line 56 def to_a [@lat,@lon] end |