Module: TrafikantenTravel::Utils
- Included in:
- Route
- Defined in:
- lib/trafikanten_travel/utils.rb
Class Method Summary collapse
Class Method Details
.fetch(url) ⇒ Object
5 6 7 |
# File 'lib/trafikanten_travel/utils.rb', line 5 def self.fetch(url) Iconv.new('UTF-8', 'LATIN1').iconv(open(url).read) end |
.time_class ⇒ Object
9 10 11 |
# File 'lib/trafikanten_travel/utils.rb', line 9 def self.time_class Time.respond_to?(:zone) ? Time.zone : Time end |