Method: Decode::Languages#source_for

Defined in:
lib/decode/languages.rb

#source_for(path) ⇒ Object



65
66
67
68
69
70
71
# File 'lib/decode/languages.rb', line 65

def source_for(path)
  extension = File.extname(path)
  
  if language = @extensions[extension]
    Source.new(path, language)
  end
end