Class: PropertyFile::SimpleReader
- Inherits:
-
Object
- Object
- PropertyFile::SimpleReader
- Defined in:
- lib/misc/propertyfile.rb
Overview
A very simple property file reader. It can only understand files with entries of the property=value format–nothing fancy.
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(file_name) ⇒ SimpleReader
constructor
A new instance of SimpleReader.
Constructor Details
#initialize(file_name) ⇒ SimpleReader
Returns a new instance of SimpleReader.
6 7 8 9 |
# File 'lib/misc/propertyfile.rb', line 6 def initialize(file_name) @file_name = file_name load() end |
Instance Method Details
#[](name) ⇒ Object
24 25 26 |
# File 'lib/misc/propertyfile.rb', line 24 def [](name) @properties[name] end |