Module: OnTheSnow::Resort::Lifts

Included in:
Resort
Defined in:
lib/onthesnow/resort/lifts.rb

Instance Method Summary collapse

Instance Method Details

#double_liftsObject



33
34
35
# File 'lib/onthesnow/resort/lifts.rb', line 33

def double_lifts
  @double_lifts ||= dom(:lifts).search("ul .double strong").text.split.join unless dom(:lifts).empty?
end

#fast_quads_liftsObject



21
22
23
# File 'lib/onthesnow/resort/lifts.rb', line 21

def fast_quads_lifts
  @fast_quads_lifts ||= dom(:lifts).search("ul .fast_quads strong").text.split.join unless dom(:lifts).empty?
end

#fast_sixes_liftsObject



17
18
19
# File 'lib/onthesnow/resort/lifts.rb', line 17

def fast_sixes_lifts
  @fast_sixes_lifts ||= dom(:lifts).search("ul .fast_sixes strong").text.split.join unless dom(:lifts).empty?
end

#liftsObject



5
6
7
# File 'lib/onthesnow/resort/lifts.rb', line 5

def lifts
  @lifts ||= {"total" => total_lifts, "trams" => trams_lifts, "fast_sixes" => fast_sixes_lifts, "fast_quads" => fast_quads_lifts, "quad" => quad_lifts, "triple" => triple_lifts, "double" => double_lifts, "surface" => surface_lifts} unless dom(:lifts).empty?
end

#quad_liftsObject



25
26
27
# File 'lib/onthesnow/resort/lifts.rb', line 25

def quad_lifts
  @quad_lifts ||= dom(:lifts).search("ul .quad strong").text.split.join unless dom(:lifts).empty?
end

#surface_liftsObject



37
38
39
# File 'lib/onthesnow/resort/lifts.rb', line 37

def surface_lifts
  @surface_lifts ||= dom(:lifts).search("ul .surface strong").text.split.join unless dom(:lifts).empty?
end

#total_liftsObject



9
10
11
# File 'lib/onthesnow/resort/lifts.rb', line 9

def total_lifts
  @total_lifts ||= dom(:lifts).search("ul .total strong").text.split.join unless dom(:lifts).empty?
end

#trams_liftsObject



13
14
15
# File 'lib/onthesnow/resort/lifts.rb', line 13

def trams_lifts
  @trams_lifts ||= dom(:lifts).search("ul .trams strong").text.split.join unless dom(:lifts).empty?
end

#triple_liftsObject



29
30
31
# File 'lib/onthesnow/resort/lifts.rb', line 29

def triple_lifts
  @triple_lifts ||= dom(:lifts).search("ul .triple strong").text.split.join unless dom(:lifts).empty?
end