Class: Net::BER::BerIdentifiedOid
- Inherits:
-
Object
- Object
- Net::BER::BerIdentifiedOid
- Defined in:
- lib/net/ber.rb
Overview
A BER object identifier.
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.
270 271 272 273 274 275 |
# File 'lib/net/ber.rb', line 270 def initialize(oid) if oid.is_a?(String) oid = oid.split(/\./).map {|s| s.to_i } end @value = oid end |
Instance Attribute Details
#ber_identifier ⇒ Object
Returns the value of attribute ber_identifier.
268 269 270 |
# File 'lib/net/ber.rb', line 268 def ber_identifier @ber_identifier end |
Instance Method Details
#to_arr ⇒ Object
289 290 291 |
# File 'lib/net/ber.rb', line 289 def to_arr @value.dup end |
#to_ber ⇒ Object
277 278 279 |
# File 'lib/net/ber.rb', line 277 def to_ber to_ber_oid end |
#to_ber_oid ⇒ Object
281 282 283 |
# File 'lib/net/ber.rb', line 281 def to_ber_oid @value.to_ber_oid end |
#to_s ⇒ Object
285 286 287 |
# File 'lib/net/ber.rb', line 285 def to_s @value.join(".") end |