Module: Spinebox::Config
- Defined in:
- lib/spinebox/config.rb
Class Method Summary collapse
-
.configuration(&block) ⇒ Object
Offer the configuration.
-
.reset! ⇒ Object
Reset the config.
Class Method Details
.configuration(&block) ⇒ Object
Offer the configuration
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/spinebox/config.rb', line 11 def self.configuration(&block) @@configuration ||= OpenStruct.new( :assets => Sprockets::Environment.new, :views => Sprockets::Environment.new, :reload => true ) block.call(@@configuration) if block @@configuration end |
.reset! ⇒ Object
Reset the config
5 6 7 |
# File 'lib/spinebox/config.rb', line 5 def self.reset! @@configuration = nil end |