Class: Camp::Montbell::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/camp/montbell/base.rb

Direct Known Subclasses

Bsite, Csite, Wallsite

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_nameObject



4
5
6
# File 'lib/camp/montbell/base.rb', line 4

def site_name
  raise 'site_name required'
end

#urlObject



8
9
10
# File 'lib/camp/montbell/base.rb', line 8

def url
  raise 'url required'
end