Class: Stylist::Processors::Processor
- Inherits:
-
Object
- Object
- Stylist::Processors::Processor
show all
- Defined in:
- lib/stylist/processor.rb
Class Method Summary
collapse
Class Method Details
.expand_stylesheet_sources(*sources) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/stylist/processor.rb', line 12
def expand_stylesheet_sources(*sources)
expansions = defined?(ActionView::Helpers::AssetTagHelper) ? ActionView::Helpers::AssetTagHelper.send(:class_variable_get, :@@stylesheet_expansions) : {}
sources.flatten.collect do |source|
case source
when Symbol
expansions[source] || raise(ArgumentError, "No expansion found for #{source.inspect}")
else
source
end
end.flatten.collect do |source|
source_ext = File.extname(source)[1..-1]
if (source_ext.blank? || ('css' != source_ext))
source += ".css"
end
Rails.root.join(configuration.public_stylesheets_path, source)
end
end
|
.process!(collection) ⇒ Object
8
9
10
|
# File 'lib/stylist/processor.rb', line 8
def process!(collection)
end
|