Class: Binenc::Ruby::ASN1Sequence
- Inherits:
-
Object
- Object
- Binenc::Ruby::ASN1Sequence
- Includes:
- ASN1Object
- Defined in:
- lib/binenc/asn1_engine/object/sequence.rb
Instance Attribute Summary
Attributes included from ASN1Object
Instance Method Summary collapse
- #encoded ⇒ Object
-
#initialize(*args, &block) ⇒ ASN1Sequence
constructor
A new instance of ASN1Sequence.
- #is_equal?(val) ⇒ Boolean
Methods included from ASN1Object
Constructor Details
#initialize(*args, &block) ⇒ ASN1Sequence
Returns a new instance of ASN1Sequence.
9 10 11 12 |
# File 'lib/binenc/asn1_engine/object/sequence.rb', line 9 def initialize(*args, &block) super @value = to_value(@value) end |
Instance Method Details
#encoded ⇒ Object
14 15 16 17 18 |
# File 'lib/binenc/asn1_engine/object/sequence.rb', line 14 def encoded @value = [@value] if not @value.is_a?(Array) value = to_encoded(@value) OpenSSL::ASN1::Sequence.new(value).to_der end |
#is_equal?(val) ⇒ Boolean
20 21 22 |
# File 'lib/binenc/asn1_engine/object/sequence.rb', line 20 def is_equal?(val) not @value.difference(val).any? end |