Class: Rfid::Config
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Rfid::Config
- Defined in:
- lib/rfid/config.rb
Instance Attribute Summary collapse
-
#filepath ⇒ Object
readonly
Returns the value of attribute filepath.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(filepath) ⇒ Config
constructor
A new instance of Config.
- #reload! ⇒ Object
Constructor Details
#initialize(filepath) ⇒ Config
Returns a new instance of Config.
8 9 10 11 |
# File 'lib/rfid/config.rb', line 8 def initialize(filepath) @filepath = filepath.to_s.strip super(parse_file) end |
Instance Attribute Details
#filepath ⇒ Object (readonly)
Returns the value of attribute filepath.
6 7 8 |
# File 'lib/rfid/config.rb', line 6 def filepath @filepath end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
6 7 8 |
# File 'lib/rfid/config.rb', line 6 def table @table end |
Instance Method Details
#reload! ⇒ Object
13 14 15 |
# File 'lib/rfid/config.rb', line 13 def reload! @table = parse_file.symbolize_keys end |