Class: Captivate::Config
- Inherits:
-
Object
- Object
- Captivate::Config
- Defined in:
- lib/captivate.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
- #to_hash ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
46 47 48 49 |
# File 'lib/captivate.rb', line 46 def initialize( = {}) @command = [:command] or raise(ConfigError, "Missing 'command' option") @rails_root = [:rails_root] or raise(ConfigError, "Missing 'rails_root' option") end |
Instance Method Details
#to_hash ⇒ Object
51 52 53 54 |
# File 'lib/captivate.rb', line 51 def to_hash validate_yaml_config { 'working_path' => working_path }.merge(yaml_config[environment]) end |