Class: RetroIDL::ASN::BITSTRING
- Defined in:
- lib/retro_idl/asn/bit_string.rb
Constant Summary collapse
- TAG_CLASS_NUMBER =
3
- TAG_CLASS =
:universal
Instance Attribute Summary
Attributes inherited from BaseType
Instance Method Summary collapse
-
#initialize(**opts) ⇒ BITSTRING
constructor
A new instance of BITSTRING.
-
#link(mod, stack) ⇒ MODULE?
resolve symbols to definitions in module.
-
#to_s ⇒ String
Convert object to ASN.1 syntax representation.
Methods inherited from BaseType
Constructor Details
#initialize(**opts) ⇒ BITSTRING
Returns a new instance of BITSTRING.
7 8 9 10 11 12 13 14 15 |
# File 'lib/retro_idl/asn/bit_string.rb', line 7 def initialize(**opts) super(**opts) @bitList = nil if opts[:bitList] @bitList = ValueList.new(opts[:bitList], NamedNumber) end end |
Instance Method Details
#link(mod, stack) ⇒ MODULE?
resolve symbols to definitions in module
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/retro_idl/asn/bit_string.rb', line 18 def link(mod, stack) if @mod.nil? or @mod != mod @mod = nil if @bitList.nil? or @bitList.link(mod, []) super(mod, stack) end else @mod end end |
#to_s ⇒ String
Convert object to ASN.1 syntax representation
32 33 34 35 36 37 38 39 40 |
# File 'lib/retro_idl/asn/bit_string.rb', line 32 def to_s result = "#{@tag} BIT STRING" if @bitList result << @bitList.to_s end result << " #{@constraint}" end |