Class: Killbill::Litle::Properties
- Defined in:
- lib/litle/config/properties.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(file = 'litle.yml') ⇒ Properties
constructor
A new instance of Properties.
- #parse! ⇒ Object
Constructor Details
#initialize(file = 'litle.yml') ⇒ Properties
Returns a new instance of Properties.
3 4 5 |
# File 'lib/litle/config/properties.rb', line 3 def initialize(file = 'litle.yml') @config_file = Pathname.new(file). end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 |
# File 'lib/litle/config/properties.rb', line 13 def [](key) @config[key] end |
#parse! ⇒ Object
7 8 9 10 11 |
# File 'lib/litle/config/properties.rb', line 7 def parse! raise "#{@config_file} is not a valid file" unless @config_file.file? @config = YAML.load_file(@config_file.to_s) validate! end |