class TCXReader::Tcx
Attributes
activities[RW]
Public Class Methods
new(file)
click to toggle source
read the file containing the tracks get the different information of the file get the tracks NOTE: removing name space may lead to some ambiguities
# File lib/tcx_reader/tcx.rb, line 30 def initialize(file) if file.is_a?(File) @tcx=Nokogiri::XML(File.open(file)).remove_namespaces! else @tcx=Nokogiri::XML(file).remove_namespaces! end @activities = [] @tcx.css("Activity").each do |act| act = Activity.new(act) @activities << act end end