Class: Ccrypto::ASN1Object
- Inherits:
-
Object
- Object
- Ccrypto::ASN1Object
- Defined in:
- lib/ccrypto/asn1_object.rb
Instance Attribute Summary collapse
-
#asn1_type ⇒ Object
readonly
Returns the value of attribute asn1_type.
Instance Method Summary collapse
-
#initialize(type, asn1) ⇒ ASN1Object
constructor
A new instance of ASN1Object.
- #is_type?(type) ⇒ Boolean
- #method_missing(mtd, *args, &block) ⇒ Object
- #native_asn1 ⇒ Object
Constructor Details
#initialize(type, asn1) ⇒ ASN1Object
Returns a new instance of ASN1Object.
7 8 9 10 |
# File 'lib/ccrypto/asn1_object.rb', line 7 def initialize(type, asn1) @asn1_type = type @asn1 = asn1 end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(mtd, *args, &block) ⇒ Object
20 21 22 |
# File 'lib/ccrypto/asn1_object.rb', line 20 def method_missing(mtd, *args, &block) @asn1.send(mtd, *args, &block) end |
Instance Attribute Details
#asn1_type ⇒ Object (readonly)
Returns the value of attribute asn1_type.
5 6 7 |
# File 'lib/ccrypto/asn1_object.rb', line 5 def asn1_type @asn1_type end |
Instance Method Details
#is_type?(type) ⇒ Boolean
16 17 18 |
# File 'lib/ccrypto/asn1_object.rb', line 16 def is_type?(type) @asn1_type.to_s.downcase.to_sym == type.to_s.downcase.to_sym end |
#native_asn1 ⇒ Object
12 13 14 |
# File 'lib/ccrypto/asn1_object.rb', line 12 def native_asn1 @asn1 end |