Class: CoffeeOutside::LocationFile
- Inherits:
-
Object
- Object
- CoffeeOutside::LocationFile
- Defined in:
- lib/coffeeoutside/locations.rb
Instance Attribute Summary collapse
-
#locations ⇒ Object
readonly
Returns the value of attribute locations.
Instance Method Summary collapse
-
#initialize(filename = "./locations.yaml") ⇒ LocationFile
constructor
A new instance of LocationFile.
Constructor Details
#initialize(filename = "./locations.yaml") ⇒ LocationFile
Returns a new instance of LocationFile.
52 53 54 55 56 57 58 59 |
# File 'lib/coffeeoutside/locations.rb', line 52 def initialize(filename = "./locations.yaml") y = YAML.load_file(filename) @locations = [] y.each do |l| @locations.append Location.new(l) end @locations # rubocop:disable Lint/Void end |
Instance Attribute Details
#locations ⇒ Object (readonly)
Returns the value of attribute locations.
50 51 52 |
# File 'lib/coffeeoutside/locations.rb', line 50 def locations @locations end |