Class: PropertyFile::SimpleReader

Inherits:
Object
  • Object
show all
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

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