Class: Rallycat::Config
- Inherits:
-
Object
- Object
- Rallycat::Config
- Defined in:
- lib/rallycat/config.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
3 4 5 6 7 8 9 10 |
# File 'lib/rallycat/config.rb', line 3 def initialize begin @config = YAML.load_file File.('~/.rallycatrc') rescue StandardError = "Your rallycat config file is missing or invalid. See 'rallycat help'." raise InvalidConfigError.new end end |
Instance Method Details
#[](key) ⇒ Object
12 13 14 |
# File 'lib/rallycat/config.rb', line 12 def [](key) @config[key] end |