Class: RASN1::Types::Null

Inherits:
Primitive show all
Defined in:
lib/rasn1/types/null.rb

Overview

ASN.1 Null

Author:

  • Sylvain Daubert

Constant Summary collapse

TAG =

Null tag value

0x05

Constants inherited from Primitive

Primitive::ASN1_PC

Constants inherited from Base

Base::CLASSES, Base::CLASS_MASK, Base::INDEFINITE_LENGTH, Base::MAX_TAG, Base::UNDUPPABLE_TYPES

Instance Attribute Summary

Attributes inherited from Base

#asn1_class, #default, #name, #value

Instance Method Summary collapse

Methods inherited from Base

#==, #constructed?, encode_type, #explicit?, #implicit?, #initialize, #initialize_copy, #optional?, parse, #parse!, #primitive?, #tag, #tagged?, #to_der, #type, type, #value_size

Constructor Details

This class inherits a constructor from RASN1::Types::Base

Instance Method Details

#inspect(level = 0) ⇒ String

Returns:

  • (String)


12
13
14
15
16
# File 'lib/rasn1/types/null.rb', line 12

def inspect(level=0)
  str = common_inspect(level)[0..-2] # remove terminal ':'
  str << ' OPTIONAL' if optional?
  str
end