Class: BER::BerIdentifiedOid

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_identifierObject

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_arrObject



23
24
25
# File 'lib/ber/identified/oid.rb', line 23

def to_arr
  @value.dup
end

#to_berObject



11
12
13
# File 'lib/ber/identified/oid.rb', line 11

def to_ber
  to_ber_oid
end

#to_ber_oidObject



15
16
17
# File 'lib/ber/identified/oid.rb', line 15

def to_ber_oid
  @value.to_ber_oid
end

#to_sObject



19
20
21
# File 'lib/ber/identified/oid.rb', line 19

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