Module: Spree::Sample
- Defined in:
- lib/spree/sample.rb
Class Method Summary collapse
Class Method Details
.load_sample(file) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/spree/sample.rb', line 3 def self.load_sample(file) path = File.(samples_path + "#{file}.rb") # Check to see if the specified file has been loaded before if !$LOADED_FEATURES.include?(path) require path puts "Loaded #{file.titleize} samples" end end |
.samples_path ⇒ Object
13 14 15 |
# File 'lib/spree/sample.rb', line 13 def self.samples_path Pathname.new(File.join(File.dirname(__FILE__), '..', '..', 'db', 'samples')) end |