class PistePal::DataServices::GpxDoc
Attributes
doc[RW]
include Singleton
Public Class Methods
instance()
click to toggle source
# File lib/piste_pal/data_services/gpx_doc.rb, line 11 def self.instance @instance || nil end
new(file_content)
click to toggle source
# File lib/piste_pal/data_services/gpx_doc.rb, line 16 def initialize file_content # TODO: Support Nokogiri reading from http website instead of file path @doc = Nokogiri::XML(file_content) do |config| config.strict.noblanks end end
set_instance(file_content)
click to toggle source
# File lib/piste_pal/data_services/gpx_doc.rb, line 8 def self.set_instance(file_content) @instance = new(file_content) end