Module: Coyote::Assets

Defined in:
lib/coyote/assets.rb,
lib/coyote/assets/base.rb,
lib/coyote/assets/less.rb,
lib/coyote/assets/javascript.rb,
lib/coyote/assets/coffeescript.rb

Defined Under Namespace

Classes: Base, CoffeeScript, JavaScript, Less

Class Method Summary collapse

Class Method Details

.choose(path) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/coyote/assets.rb', line 15

def self.choose(path)
  case File.extname(path)
  when /\.js/i      ; JavaScript.new(path)
  when /\.coffee/i  ; CoffeeScript.new(path)
  when /\.less/i    ; Less.new(path)
  else              ; Base.new(path)
  end
end