Module: OnTheSnow::Resort::Snow

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

Instance Method Summary collapse

Instance Method Details

#last_24Object



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

def last_24
  @last_24 ||= dom(:snow).search(".white_pill")[0].text.split.join unless dom(:snow).empty?
end

#last_48Object



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

def last_48
  @last_48 ||= dom(:snow).search(".white_pill")[1].text.split.join unless dom(:snow).empty?
end

#last_72Object



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

def last_72
  @last_72 ||= dom(:snow).search(".white_pill")[2].text.split.join unless dom(:snow).empty?
end

#snowObject



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

def snow
  @snow ||= {"last_24" => last_24, "last_48" => last_48, "last_72" => last_72} unless dom(:snow).empty?
end