Class: Spurious::Server::Config
- Inherits:
-
Object
- Object
- Spurious::Server::Config
- Defined in:
- lib/spurious/server/config.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Instance Method Summary collapse
- #for(name) ⇒ Object
-
#initialize(config_location) ⇒ Config
constructor
A new instance of Config.
- #name_exists?(name) ⇒ Boolean
Constructor Details
#initialize(config_location) ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/spurious/server/config.rb', line 8 def initialize(config_location) @app = YAML::load_file(config_location) end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
6 7 8 |
# File 'lib/spurious/server/config.rb', line 6 def app @app end |
Instance Method Details
#for(name) ⇒ Object
16 17 18 |
# File 'lib/spurious/server/config.rb', line 16 def for(name) app[name] end |
#name_exists?(name) ⇒ Boolean
12 13 14 |
# File 'lib/spurious/server/config.rb', line 12 def name_exists?(name) app.has_key? name end |