Sha256: fbbb2e9423f0be853c0e480763987774fc6017414e34f3321ba400c21196366c
Contents?: true
Size: 883 Bytes
Versions: 9
Compression:
Stored size: 883 Bytes
Contents
module Spinebox module Config # Reset the config def self.reset! @@configuration = nil end reset! # Offer the configuration def self.configuration(&block) @@configuration ||= OpenStruct.new( :assets => Sprockets::Environment.new, :views => Sprockets::Environment.new ) block.call(@@configuration) if block @@configuration end end class << self # Offers the configuration with the assets def config block = Proc.new if block_given? Config.configuration(&block) end # Straight access to the assets def assets config.assets end # Straight access to the views def views config.views end # Load the config def load_config!(config = "./config/config.rb") load config end end end
Version data entries
9 entries across 9 versions & 1 rubygems