Class: Rfid::Config

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/rfid/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filepathObject (readonly)

Returns the value of attribute filepath.



6
7
8
# File 'lib/rfid/config.rb', line 6

def filepath
  @filepath
end

#tableObject (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