Class: Diamante::Config
- Inherits:
-
Object
- Object
- Diamante::Config
- Defined in:
- lib/diamante/config.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(configfile) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(configfile) ⇒ Config
Returns a new instance of Config.
7 8 9 10 |
# File 'lib/diamante/config.rb', line 7 def initialize(configfile) @data = YAML.load(File.read configfile) # @data[:eligible_chars] = "ª\|@·#$~%&/\¿¸^*¨;•:·_-+'.,".chars + ['.', ' '] end |
Instance Method Details
#[](key) ⇒ Object
12 13 14 |
# File 'lib/diamante/config.rb', line 12 def [](key) @data[key] end |