Class: Camp::Montbell::Base
- Inherits:
-
Object
- Object
- Camp::Montbell::Base
- Defined in:
- lib/camp/montbell/base.rb
Instance Method Summary collapse
Instance Method Details
#possible_days(doc) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/camp/montbell/base.rb', line 12 def possible_days(doc) doc.xpath('//a').map {|element| element["href"]}.compact.map do |link| if link =~ /start_date/ DateTime.parse(link.gsub(/.*start_date=/, '')) end end.compact end |
#site_name ⇒ Object
4 5 6 |
# File 'lib/camp/montbell/base.rb', line 4 def site_name raise 'site_name required' end |
#url ⇒ Object
8 9 10 |
# File 'lib/camp/montbell/base.rb', line 8 def url raise 'url required' end |