Class: Codeowners::Cli::Base

Inherits:
Thor
  • Object
show all
Defined in:
lib/codeowners/cli/base.rb

Overview

Base collects shared methods used by all CLI sub commands It loads and validate the default config file or output an explanation about how to configure it.

Direct Known Subclasses

Config, Filter, Main, OwnersListHandler

Instance Method Summary collapse

Constructor Details

#initialize(args = [], options = {}, config = {}) ⇒ Base

Returns a new instance of Base.



14
15
16
17
18
# File 'lib/codeowners/cli/base.rb', line 14

def initialize(args = [], options = {}, config = {})
  super
  @config ||= config[:config] || default_config
  Warner.check_warnings
end