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.



271
272
273
274
275
276
# File 'lib/net/ber.rb', line 271

def initialize(oid)
  if oid.is_a?(String)
    oid = oid.split(/\./).map(&:to_i)
  end
  @value = oid
end

Instance Attribute Details

#ber_identifierObject

Returns the value of attribute ber_identifier.



269
270
271
# File 'lib/net/ber.rb', line 269

def ber_identifier
  @ber_identifier
end

Instance Method Details

#to_arrObject



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

def to_arr
  @value.dup
end

#to_berObject



278
279
280
# File 'lib/net/ber.rb', line 278

def to_ber
  to_ber_oid
end

#to_ber_oidObject



282
283
284
# File 'lib/net/ber.rb', line 282

def to_ber_oid
  @value.to_ber_oid
end

#to_sObject



286
287
288
# File 'lib/net/ber.rb', line 286

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