module Assette::Reader

Constants

ALL
OUTPUTS
OUTPUT_MAP

Public Instance Methods

possible_targets(path) click to toggle source
# 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) click to toggle source
# File lib/assette/reader.rb, line 17
def target_class ex
  Assette::Reader::ALL[Assette::Reader::OUTPUT_MAP[ex]]
end