class FoodCritic::Linter

def parse_rule_file(file)

Returns:
  • (Array) - array of tag rules from the file

Parameters:
  • rule (String) -- file path
def parse_rule_file(file)
  tags = []
  begin
    rule_file = open(file)
    tag_text = rule_file.read
    rule_file.close
    tags = tag_text.split(/\s/)
  rescue
    raise "ERROR: Could not read or parse the specified rule file at #{file}"
  end
  tags
end