Class: Bourdain::Helpers::Config
- Inherits:
-
Object
- Object
- Bourdain::Helpers::Config
- Defined in:
- lib/bourdain/helpers/config.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize(path) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(path) ⇒ Config
Returns a new instance of Config.
7 8 9 |
# File 'lib/bourdain/helpers/config.rb', line 7 def initialize path @items = JSON::parse File.read(path), symbolize_names: true rescue {} end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
6 7 8 |
# File 'lib/bourdain/helpers/config.rb', line 6 def items @items end |