Module: OnTheSnow::Resort::Slopes

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

Instance Method Summary collapse

Instance Method Details

#advanced_slopesObject



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

def advanced_slopes
  @advanced_slopes ||= dom(:slopes).search(".advanced").text.split.join unless dom(:slopes).empty?
end

#beginner_slopesObject



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

def beginner_slopes
  @beginner_slopes ||= dom(:slopes).search(".beginner").text.split.join unless dom(:slopes).empty?
end

#expert_slopesObject



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

def expert_slopes
  @expert_slopes ||= dom(:slopes).search(".expert").text.split.join unless dom(:slopes).empty?
end

#intermediate_slopesObject



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

def intermediate_slopes
  @intermediate_slopes ||= dom(:slopes).search(".intermediate").text.split.join unless dom(:slopes).empty?
end

#slopesObject



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

def slopes
  @slopes ||= {"beginner" => beginner_slopes, "intermediate" => intermediate_slopes, "advanced" => advanced_slopes, "expert" => expert_slopes} unless dom(:slopes).empty?
end