Module: OnTheSnow::Resort::Elevation

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

Instance Method Summary collapse

Instance Method Details

#elevationObject



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

def elevation
  @elevation ||= {"peak" => peak, "height_difference" => height_difference, "valley" => valley} unless dom(:elevation).empty?
end

#height_differenceObject



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

def height_difference 
  @height ||= dom(:elevation).search("ul li")[1].search(".white_pill").children.text.split.join unless dom(:elevation).empty?
end

#peakObject



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

def peak 
  @peak ||= dom(:elevation).search("ul li")[0].search(".white_pill").children.text.split.join unless dom(:elevation).empty?
end

#valleyObject



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

def valley
  @valley ||= dom(:elevation).search("ul li")[2].search(".white_pill").children.text.split.join unless dom(:elevation).empty?
end