Class: BER::BerIdentifiedOid
- Inherits:
-
Object
- Object
- BER::BerIdentifiedOid
- Defined in:
- lib/ber/identified/oid.rb
Instance Attribute Summary collapse
-
#ber_identifier ⇒ Object
Returns the value of attribute ber_identifier.
Instance Method Summary collapse
-
#initialize(oid) ⇒ BerIdentifiedOid
constructor
A new instance of BerIdentifiedOid.
- #to_arr ⇒ Object
- #to_ber ⇒ Object
- #to_ber_oid ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(oid) ⇒ BerIdentifiedOid
Returns a new instance of BerIdentifiedOid.
7 8 9 |
# File 'lib/ber/identified/oid.rb', line 7 def initialize(oid) @value = oid.split(/\./).map(&:to_i) if oid.is_a?(String) end |
Instance Attribute Details
#ber_identifier ⇒ Object
Returns the value of attribute ber_identifier.
5 6 7 |
# File 'lib/ber/identified/oid.rb', line 5 def ber_identifier @ber_identifier end |
Instance Method Details
#to_arr ⇒ Object
23 24 25 |
# File 'lib/ber/identified/oid.rb', line 23 def to_arr @value.dup end |
#to_ber ⇒ Object
11 12 13 |
# File 'lib/ber/identified/oid.rb', line 11 def to_ber to_ber_oid end |
#to_ber_oid ⇒ Object
15 16 17 |
# File 'lib/ber/identified/oid.rb', line 15 def to_ber_oid @value.to_ber_oid end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/ber/identified/oid.rb', line 19 def to_s @value.join('.') end |