Class: MongodbLogger::Assets

Inherits:
Sprockets::Environment
  • Object
show all
Defined in:
lib/mongodb_logger/server/helpers/sprokets.rb

Class Method Summary collapse

Instance Method Summary collapse

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.expand_path('../../../../../app/assets', __FILE__)
  @instance ||= new(assets_path)
end