Class: Net::BER::BerIdentifiedOid

Inherits:
Object
  • Object
show all
Defined in:
lib/net/ber.rb

Overview

A BER object identifier.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oid) ⇒ BerIdentifiedOid

Returns a new instance of BerIdentifiedOid.



291
292
293
294
295
296
# File 'lib/net/ber.rb', line 291

def initialize(oid)
  if oid.is_a?(String)
    oid = oid.split(/\./).map {|s| s.to_i }
  end
  @value = oid
end

Instance Attribute Details

#ber_identifierObject

Returns the value of attribute ber_identifier.



289
290
291
# File 'lib/net/ber.rb', line 289

def ber_identifier
  @ber_identifier
end

Instance Method Details

#to_arrObject



310
311
312
# File 'lib/net/ber.rb', line 310

def to_arr
  @value.dup
end

#to_berObject



298
299
300
# File 'lib/net/ber.rb', line 298

def to_ber
  to_ber_oid
end

#to_ber_oidObject



302
303
304
# File 'lib/net/ber.rb', line 302

def to_ber_oid
  @value.to_ber_oid
end

#to_sObject



306
307
308
# File 'lib/net/ber.rb', line 306

def to_s
  @value.join(".")
end