Module: RASN1::Types

Defined in:
lib/rasn1/types.rb,
lib/rasn1/types/any.rb,
lib/rasn1/types/set.rb,
lib/rasn1/types/base.rb,
lib/rasn1/types/null.rb,
lib/rasn1/types/choice.rb,
lib/rasn1/types/set_of.rb,
lib/rasn1/types/boolean.rb,
lib/rasn1/types/integer.rb,
lib/rasn1/types/sequence.rb,
lib/rasn1/types/set_spec.rb,
lib/rasn1/types/ia5string.rb,
lib/rasn1/types/object_id.rb,
lib/rasn1/types/primitive.rb,
lib/rasn1/types/bit_string.rb,
lib/rasn1/types/enumerated.rb,
lib/rasn1/types/constructed.rb,
lib/rasn1/types/sequence_of.rb,
lib/rasn1/types/utf8_string.rb,
lib/rasn1/types/octet_string.rb,
lib/rasn1/types/numeric_string.rb,
lib/rasn1/types/visible_string.rb,
lib/rasn1/types/printable_string.rb

Overview

This modules is a namesapce for all ASN.1 type classes.

Author:

  • Sylvain Daubert

Defined Under Namespace

Classes: Any, Base, BitString, Boolean, Choice, Constructed, Enumerated, IA5String, Integer, Null, NumericString, ObjectId, OctetString, Primitive, PrintableString, Sequence, SequenceOf, Set, SetOf, Utf8String, VisibleString

Class Method Summary collapse

Class Method Details

.constructedArray<Types::Constructed>

Give all constructed types

Returns:



15
16
17
18
# File 'lib/rasn1/types.rb', line 15

def self.constructed
  self.constants.map { |c| Types.const_get(c) }.
      select { |klass| klass < Constructed }
end

.primitivesArray<Types::Primitive>

Give all primitive types

Returns:



8
9
10
11
# File 'lib/rasn1/types.rb', line 8

def self.primitives
  self.constants.map { |c| Types.const_get(c) }.
      select { |klass| klass < Primitive }
end