Class: Chagall::Cli
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Chagall::Cli
- Defined in:
- lib/chagall/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.options_from_config_file ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/chagall/cli.rb', line 19 def self. @options_from_config_file ||= begin config_path = File.join(Dir.pwd, "chagall.yml") || File.join(Dir.pwd, "chagall.yaml") return {} unless File.exist?(config_path) config = YAML.load_file(config_path) config.transform_keys(&:to_sym) rescue StandardError => e puts "Warning: Error loading chagall.yml: #{e.}" {} end end |