Class: KerioIcal::Config
- Inherits:
-
Object
- Object
- KerioIcal::Config
- Defined in:
- lib/kerio-ical/config.rb
Overview
Holds config parameters.
Class Method Summary collapse
-
.[](key) ⇒ Object
access config params.
-
.config=(c) ⇒ Object
set config hash.
-
.method_missing(name, *options, &block) ⇒ Object
access to config params through class methods i.e Config.url.
Class Method Details
.[](key) ⇒ Object
access config params
12 13 14 15 |
# File 'lib/kerio-ical/config.rb', line 12 def [](key) @config ||= YAML::load_file( File.join(ROOT_DIR, "..", "config", "config.yml") ) @config[key] end |
.config=(c) ⇒ Object
set config hash
7 8 9 |
# File 'lib/kerio-ical/config.rb', line 7 def config=(c) @config = c end |
.method_missing(name, *options, &block) ⇒ Object
access to config params through class methods i.e Config.url
19 20 21 |
# File 'lib/kerio-ical/config.rb', line 19 def method_missing(name, *, &block) self[name.to_s] or super end |