Module: Camp::Montbell
- Defined in:
- lib/camp/montbell.rb,
lib/camp/montbell/base.rb,
lib/camp/montbell/b_site.rb,
lib/camp/montbell/c_site.rb,
lib/camp/montbell/wall_site.rb
Defined Under Namespace
Classes: Base, Bsite, Csite, Wallsite
Constant Summary collapse
- SITES =
%w(Bsite Csite)
Class Method Summary collapse
Class Method Details
.sites ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/camp/montbell.rb', line 9 def self.sites charset = 'utf-8' SITES.map do |s| site = Object.const_get("Camp::Montbell::#{s}").new html = URI.open(site.url) { |f| f.read } doc = Nokogiri::HTML.parse(html, nil, charset) ::Camp::Site.new(site.site_name, site.possible_days(doc)) end end |