Class: RetroIDL::ASN::SEQUENCEOF
- Defined in:
- lib/retro_idl/asn/sequenceof.rb
Constant Summary collapse
- TAG_CLASS_NUMBER =
16
- TAG_CLASS =
:universal
Instance Attribute Summary
Attributes inherited from BaseType
Instance Method Summary collapse
-
#initialize(**opts) ⇒ SEQUENCEOF
constructor
A new instance of SEQUENCEOF.
- #link(mod, stack) ⇒ Object
-
#to_s ⇒ String
Convert object to ASN.1 syntax representation.
Methods inherited from BaseType
Constructor Details
#initialize(**opts) ⇒ SEQUENCEOF
Returns a new instance of SEQUENCEOF.
26 27 28 29 30 31 |
# File 'lib/retro_idl/asn/sequenceof.rb', line 26 def initialize(**opts) super(**opts) @type = RetroIDL::ASN.const_get(opts[:type][:class]).new( **opts[:type] ) end |
Instance Method Details
#link(mod, stack) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/retro_idl/asn/sequenceof.rb', line 33 def link(mod, stack) if @mod.nil? or @mod != mod @mod = nil if @type.link(mod, stack) super(mod, stack) end else @mod end end |
#to_s ⇒ String
Convert object to ASN.1 syntax representation
54 55 56 57 58 |
# File 'lib/retro_idl/asn/sequenceof.rb', line 54 def to_s "#{@tag} SEQUENCE #{@constraint} OF #{@type}" end |