Sha256: 663f9a54009d294b811d090feb6780cef09ae3b3acfb414cbe641add9888ea40

Contents?: true

Size: 358 Bytes

Versions: 3

Compression:

Stored size: 358 Bytes

Contents

module Rooftop
  class MenuItem
    def initialize(args)
      args.each do |k,v|
        instance_variable_set("@#{k}", v)
        self.class.send(:attr_accessor, k)
      end
    end

    def id
      self.instance_variable_get(:"@ID")
    end

    def ==(other)
      other.class == self.class && other.respond_to?(:id) && other.id == id
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rooftop-0.0.5 lib/rooftop/models/menu_item.rb
rooftop-0.0.3 lib/rooftop/models/menu_item.rb
rooftop-0.0.1 lib/rooftop_client/models/menu_item.rb