module Giteaucrat::Formatters
Constants
- EXTENSIONS
- UnknownFormatError
Public Instance Methods
formatter_for(file)
click to toggle source
# File lib/giteaucrat/formatters.rb, line 27 def formatter_for(file) extension = ::File.extname(file.name) formatter = EXTENSIONS[extension] raise(UnknownFormatError, extension) unless formatter const_get(formatter).new(file) end