class Rucc::Kind

Attributes

id[R]

Public Class Methods

def_kind(name, id) click to toggle source
# File lib/rucc/kind.rb, line 6
def def_kind(name, id)
  const_set(name, self.new(id, name))
end
new(id, name) click to toggle source
# File lib/rucc/kind.rb, line 11
def initialize(id, name)
  @id  = id  # Used only for <=>
  @name = name
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/rucc/kind.rb, line 17
def <=>(other)
  @id <=> other.id
end
to_s() click to toggle source
# File lib/rucc/kind.rb, line 21
def to_s
  @name.to_s
end