Module: Assette::Reader
- Extended by:
- Reader
- Included in:
- Reader
- Defined in:
- lib/assette/reader.rb
Defined Under Namespace
Classes: Base, Coffee, Css, Js, Less, Sass, Scss, UnknownReader
Constant Summary
collapse
- OUTPUTS =
Hash.new {|h,k| h[k] = []}
- ALL =
{}
- OUTPUT_MAP =
{}
Instance Method Summary
collapse
Instance Method Details
#possible_targets(path) ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/assette/reader.rb', line 8
def possible_targets path
match = path.match(/(.+\.)([a-z]+)$/i)
return [] unless match
file = match[1]
ext = match[2]
OUTPUTS[ext.to_sym].collect { |cla| file + cla.extension }
end
|
#target_class(ex) ⇒ Object
17
18
19
|
# File 'lib/assette/reader.rb', line 17
def target_class ex
Assette::Reader::ALL[Assette::Reader::OUTPUT_MAP[ex]]
end
|