Method: TLV::TLV.lookup

Defined in:
lib/tlv/constructed.rb

.lookup(tag) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/tlv/constructed.rb', line 35

def lookup tag
  return self if tag == self.tag
  @tlv_classes ||= {}
  tlv = @tlv_classes[tag]
  if !tlv && ! (self == TLV)
    warn "looking up tag #{TLV.b2s(tag)} in super!"
    raise "bla"
    tlv ||= super
  end
  tlv
end