Module: Sunniesnow::Charter::CLI

Defined in:
lib/sscharter/cli.rb,
lib/sscharter/cli.rb

Defined Under Namespace

Modules: FilewatcherPatch, OptionParserPatch Classes: Subcommand

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.commandsObject (readonly)

Returns the value of attribute commands.



33
34
35
# File 'lib/sscharter/cli.rb', line 33

def commands
  @commands
end

Class Method Details

.configObject



24
25
26
27
28
29
30
31
# File 'lib/sscharter/cli.rb', line 24

def config
	filenames = %w[sscharter.yml sscharter.yaml .sscharter.yml .sscharter.yaml].map { File.join PROJECT_DIR, _1 }
	unless filename = filenames.find { File.exist? _1 }
		$stderr.puts 'Config file sscharter.yml not found'
		return nil
	end
	YAML.load_file filename, symbolize_names: true
end