Class: RASN1::Types::Null
- Defined in:
- lib/rasn1/types/null.rb
Overview
ASN.1 Null
Constant Summary collapse
- ID =
Null id value
0x05
Constants inherited from Primitive
Constants inherited from Base
Base::CLASSES, Base::CLASS_MASK, Base::INDEFINITE_LENGTH, Base::MULTI_OCTETS_ID
Instance Attribute Summary
Attributes inherited from Base
#asn1_class, #default, #name, #options
Instance Method Summary collapse
-
#can_build? ⇒ Boolean
Build only if not optional.
- #inspect(level = 0) ⇒ String
Methods inherited from Base
#==, constrained?, #constructed?, #do_parse_explicit_with_tracing, #do_parse_with_tracing, encoded_type, #explicit?, #id, #implicit?, #initialize, #initialize_copy, #optional?, parse, #parse!, #primitive?, #specific_initializer, start_tracing, stop_tracing, #tagged?, #to_der, #trace, type, #type, #value, #value=, #value?, #value_size, #void_value
Constructor Details
This class inherits a constructor from RASN1::Types::Base
Instance Method Details
#can_build? ⇒ Boolean
Build only if not optional
20 21 22 |
# File 'lib/rasn1/types/null.rb', line 20 def can_build? !optional? end |
#inspect(level = 0) ⇒ 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 |