Class: Locomotive::Steam::SprocketsEnvironment

Inherits:
Sprockets::Environment
  • Object
show all
Defined in:
lib/locomotive/steam/initializers/sprockets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root, options = {}) ⇒ SprocketsEnvironment

Returns a new instance of SprocketsEnvironment.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/locomotive/steam/initializers/sprockets.rb', line 16

def initialize(root, options = {})
  super(root)

  @steam_path = root

  append_steam_paths

  install_minifiers if options[:minify]

  install_autoprefixer

  context_class.class_eval do
    def asset_path(path, options = {})
      path
    end
  end
end

Instance Attribute Details

#steam_pathObject (readonly)

Returns the value of attribute steam_path.



14
15
16
# File 'lib/locomotive/steam/initializers/sprockets.rb', line 14

def steam_path
  @steam_path
end