Module: Camp
- Defined in:
- lib/camp.rb,
lib/camp/site.rb,
lib/camp/version.rb,
lib/camp/montbell.rb,
lib/camp/hadomisaki.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
Modules: Hadomisaki, Montbell Classes: Site
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
Class Method Details
.can_reserve_sites(day) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/camp.rb', line 9 def self.can_reserve_sites(day) raise "input parameter must be Date class" if day.class != Date %w(Montbell Hadomisaki).map do |s| Object.const_get("Camp::#{s}").sites.map do |site| site.name if site.can_reserve?(day) end.compact end.compact.flatten end |