class FoodCritic::Linter
def dsl_method_for_file(file)
def dsl_method_for_file(file) dir_mapping = { "attributes" => :attributes, "libraries" => :library, "providers" => :provider, "resources" => :resource, "templates" => :template, } if file.end_with? ".erb" dir_mapping[File.basename(File.dirname(File.dirname(file)))] else dir_mapping[File.basename(File.dirname(file))] end end