Class: GpxDoctor::Models::Track
- Inherits:
-
Struct
- Object
- Struct
- GpxDoctor::Models::Track
- Defined in:
- lib/gpx_doctor/models/track.rb
Instance Attribute Summary collapse
-
#cmt ⇒ Object
Returns the value of attribute cmt.
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#links ⇒ Object
Returns the value of attribute links.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#segments ⇒ Object
Returns the value of attribute segments.
-
#src ⇒ Object
Returns the value of attribute src.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize ⇒ Track
constructor
A new instance of Track.
- #points ⇒ Object
Constructor Details
#initialize ⇒ Track
Returns a new instance of Track.
9 10 11 12 13 |
# File 'lib/gpx_doctor/models/track.rb', line 9 def initialize(**) super self.links ||= [] self.segments ||= [] end |
Instance Attribute Details
#cmt ⇒ Object
Returns the value of attribute cmt
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def cmt @cmt end |
#desc ⇒ Object
Returns the value of attribute desc
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def desc @desc end |
#links ⇒ Object
Returns the value of attribute links
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def links @links end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def name @name end |
#number ⇒ Object
Returns the value of attribute number
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def number @number end |
#segments ⇒ Object
Returns the value of attribute segments
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def segments @segments end |
#src ⇒ Object
Returns the value of attribute src
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def src @src end |
#type ⇒ Object
Returns the value of attribute type
5 6 7 |
# File 'lib/gpx_doctor/models/track.rb', line 5 def type @type end |
Instance Method Details
#points ⇒ Object
15 16 17 |
# File 'lib/gpx_doctor/models/track.rb', line 15 def points segments.flat_map(&:points) end |