class Rice::Dining::Allergen

Attributes

id[R]
shortcode[R]

Public Class Methods

new(id, shortcode) click to toggle source
# File lib/rice/dining.rb, line 77
def initialize id, shortcode
  raise ArgumentError if !id.is_a? Symbol or !shortcode.is_a? Symbol
  @id, @shortcode = id, shortcode
  self.freeze
end

Public Instance Methods

!=(other) click to toggle source
# File lib/rice/dining.rb, line 87
def != other
  (self <=> other) != 0
end
<=>(other) click to toggle source
# File lib/rice/dining.rb, line 91
def <=> other
  self.id <=> other.id
end
==(other) click to toggle source
# File lib/rice/dining.rb, line 83
def == other
  (self <=> other) == 0
end
hash() click to toggle source
# File lib/rice/dining.rb, line 95
def hash
  self.id.hash
end