Sha256: 748111bbbb9c30b4876545dec329bf6d8c817adec1687618c04dc17a3a9ff32b

Contents?: true

Size: 454 Bytes

Versions: 5

Compression:

Stored size: 454 Bytes

Contents

module Hungry
  class Menu
    class Dish < Resource

      attr_accessor :name, :price, :description, :options, :photos, :category

      def options
        @options ||= []
      end

      def options=(new_options)
        @options = new_options.map do |attributes|
          option = Menu::Option.new(attributes)
          option.dish        = self
          option.data_source = data_source
          option
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hungry-0.2.0 lib/hungry/menu/dish.rb
hungry-0.1.5 lib/hungry/menu/dish.rb
hungry-0.1.4 lib/hungry/menu/dish.rb
hungry-0.1.3 lib/hungry/menu/dish.rb
hungry-0.1.2 lib/hungry/menu/dish.rb