Class: Bourdain::Helpers::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/bourdain/helpers/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#itemsObject (readonly)

Returns the value of attribute items.



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

def items
  @items
end