Sha256: 6cc93270c6d71be3f80155fe62ac35a9e93573ae4aa459a03f1b202f25194d31
Contents?: true
Size: 435 Bytes
Versions: 2
Compression:
Stored size: 435 Bytes
Contents
module Hungry class Menu class Category < Resource attr_accessor :id, :name, :dishes, :menu def dishes @dishes ||= [] end def dishes=(new_dishes) @dishes = new_dishes.map do |attributes| dish = Menu::Dish.new(attributes) dish.category = self dish.data_source = data_source dish end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hungry-0.1.1 | lib/hungry/menu/category.rb |
hungry-0.1.0 | lib/hungry/menu/category.rb |