Class: ReadGpx
- Inherits:
-
Object
- Object
- ReadGpx
- Defined in:
- lib/gpx_manipulator/read_gpx.rb
Instance Attribute Summary collapse
-
#tracks ⇒ Object
readonly
Returns the value of attribute tracks.
Instance Method Summary collapse
-
#initialize(file:) ⇒ ReadGpx
constructor
A new instance of ReadGpx.
- #read ⇒ Object
Constructor Details
#initialize(file:) ⇒ ReadGpx
Returns a new instance of ReadGpx.
8 9 10 |
# File 'lib/gpx_manipulator/read_gpx.rb', line 8 def initialize(file:) @file = file end |
Instance Attribute Details
#tracks ⇒ Object (readonly)
Returns the value of attribute tracks.
6 7 8 |
# File 'lib/gpx_manipulator/read_gpx.rb', line 6 def tracks @tracks end |
Instance Method Details
#read ⇒ Object
12 13 14 15 |
# File 'lib/gpx_manipulator/read_gpx.rb', line 12 def read gpx_object = GPX::GPXFile.new(gpx_file: @file) @tracks = gpx_object.tracks end |