Class: Ober::Configuration
- Inherits:
-
Object
- Object
- Ober::Configuration
- Defined in:
- lib/ober/configuration.rb
Overview
Ober configuration, which is read from a file called ‘ober_menu’ or from stdin. The configuration is a Ruby DSL. Check out child classes of the configuration for understanding the DSL.
Defined Under Namespace
Classes: Application, Environment, Source
Class Method Summary collapse
Instance Method Summary collapse
- #environment(env) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #parse(source, file_name) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
71 72 73 |
# File 'lib/ober/configuration.rb', line 71 def initialize @environments = Hash.new { |h,k| h[k] = Environment.new(k) } end |
Class Method Details
.parse(*args) ⇒ Object
63 64 65 |
# File 'lib/ober/configuration.rb', line 63 def self.parse *args new.tap { |o| o.parse(*args) } end |
Instance Method Details
#environment(env) ⇒ Object
75 76 77 |
# File 'lib/ober/configuration.rb', line 75 def environment env @environments[env.to_sym] end |