Method: Cog::DSL::Cogfile#language_extensions

Defined in:
lib/cog/dsl/cogfile.rb

#language_extensions(map) ⇒ nil

Explicitly specify a mapping from file extensions to languages

Parameters:

  • map (Hash)

    key-value pairs from this mapping will override the default language map supplied by cog

Returns:

  • (nil)


80
81
82
83
84
85
86
87
# File 'lib/cog/dsl/cogfile.rb', line 80

def language_extensions(map)
  return if plugin_path_only?
  config_eval do
    map.each_pair do |key, value|
      @language_extension_map[key.to_s.downcase] = value.to_s.downcase
    end
  end
end