Class: Trocla::Stores
- Inherits:
-
Object
- Object
- Trocla::Stores
- Defined in:
- lib/trocla/stores.rb
Overview
store management
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.[](store) ⇒ Object
5 6 7 |
# File 'lib/trocla/stores.rb', line 5 def [](store) stores[store.to_s.downcase] end |
.all ⇒ Object
9 10 11 12 13 |
# File 'lib/trocla/stores.rb', line 9 def all @all ||= Dir[ path '*' ].collect do |store| File.basename(store, '.rb').downcase end end |
.available?(store) ⇒ Boolean
15 16 17 |
# File 'lib/trocla/stores.rb', line 15 def available?(store) all.include?(store.to_s.downcase) end |