Class: MongodbLogger::Assets
- Inherits:
-
Sprockets::Environment
- Object
- Sprockets::Environment
- MongodbLogger::Assets
- Defined in:
- lib/mongodb_logger/server/helpers/sprokets.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(assets_path) ⇒ Assets
constructor
A new instance of Assets.
Constructor Details
#initialize(assets_path) ⇒ Assets
Returns a new instance of Assets.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/mongodb_logger/server/helpers/sprokets.rb', line 28 def initialize(assets_path) super append_path(File.join(assets_path, 'stylesheets')) append_path(File.join(assets_path, 'javascripts')) append_path(File.join(assets_path, 'images')) context_class.instance_eval do include AssetHelpers end end |
Class Method Details
.instance(root = nil) ⇒ Object
22 23 24 25 |
# File 'lib/mongodb_logger/server/helpers/sprokets.rb', line 22 def instance(root = nil) assets_path = File.('../../../../../app/assets', __FILE__) @instance ||= new(assets_path) end |