Class: TodoLint::ConfigFile

Inherits:
Object
  • Object
show all
Defined in:
lib/todo_lint/config_file.rb

Overview

Loads the config file (.todo-lint.yml)

Instance Method Summary collapse

Instance Method Details

#read_config_file(file) ⇒ Hash

Parses the config file and loads the options

Examples:

ConfigFile.new.read_config_file(‘.todo-lint.yml’)


Returns:

  • (Hash)

    parsed file-options



10
11
12
13
14
15
16
17
18
# File 'lib/todo_lint/config_file.rb', line 10

def read_config_file(file)
  @config_hash = YAML.load_file(file)
  @starting_path = File.expand_path(File.split(file).first)
  @config_options = {}
  load_tags
  load_file_exclusions
  load_extension_inclusions
  config_options
end