Method: PEROBS::ClassMap#class_to_id

Defined in:
lib/perobs/ClassMap.rb

#class_to_id(klass) ⇒ Fixnum

Get the ID for a given class.

Parameters:

  • klass (String)

    Class

Returns:

  • (Fixnum)

    ID. If klass is not yet known a new ID will be allocated.



52
53
54
# File 'lib/perobs/ClassMap.rb', line 52

def class_to_id(klass)
  @by_class[klass] || new_id(klass)
end