Class: Sinatra::Sprockets::Configuration
- Inherits:
-
Object
- Object
- Sinatra::Sprockets::Configuration
- Defined in:
- lib/sinatra/sprockets/configuration.rb
Constant Summary collapse
- DEFAULTS =
{ :digest => true, :debug => false, :compile => false, :compress => true, :prefix => "assets", :host => nil, :relative_url_root => ENV['RACK_RELATIVE_URL_ROOT'], :precompile => [ /\w+\.(?!js|css).+/, /application.(css|js)$/ ], :manifest_path => "public/assets", :app => nil }
- OPTIONS =
DEFAULTS.keys
Instance Method Summary collapse
- #append_path(path) ⇒ Object
- #digests ⇒ Object
- #digests=(value) ⇒ Object
- #environment ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #inspect ⇒ Object
- #paths ⇒ Object
- #paths=(value) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
34 35 36 37 38 |
# File 'lib/sinatra/sprockets/configuration.rb', line 34 def initialize @_config = DEFAULTS @_digests = {} @_paths = [] end |
Instance Method Details
#append_path(path) ⇒ Object
48 49 50 |
# File 'lib/sinatra/sprockets/configuration.rb', line 48 def append_path(path) @_paths << path end |
#digests ⇒ Object
40 41 42 |
# File 'lib/sinatra/sprockets/configuration.rb', line 40 def digests @_digests end |
#digests=(value) ⇒ Object
44 45 46 |
# File 'lib/sinatra/sprockets/configuration.rb', line 44 def digests=(value) @_digests = value end |
#environment ⇒ Object
64 65 66 |
# File 'lib/sinatra/sprockets/configuration.rb', line 64 def environment Sinatra::Sprockets.environment end |
#inspect ⇒ Object
60 61 62 |
# File 'lib/sinatra/sprockets/configuration.rb', line 60 def inspect @_config.inspect end |
#paths ⇒ Object
56 57 58 |
# File 'lib/sinatra/sprockets/configuration.rb', line 56 def paths @_paths end |
#paths=(value) ⇒ Object
52 53 54 |
# File 'lib/sinatra/sprockets/configuration.rb', line 52 def paths=(value) @_paths = value.to_a end |