Method: ExtID::Type#initialize

Defined in:
lib/extid.rb

#initialize(prefix, key) ⇒ Type

Returns a new instance of Type.

Raises:

  • (ArgumentError)


11
12
13
14
15
16
# File 'lib/extid.rb', line 11

def initialize(prefix, key)
  raise ArgumentError, "key must be exactly 16 bytes" unless key.bytesize == 16

  @prefix = prefix + "_"
  @key = key
end