Class: BER::BerIdentifiedString

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

Overview

Wrapper around a String

See Also:

  • Function.parse_ber_object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ BerIdentifiedString

Returns a new instance of BerIdentifiedString.



10
11
12
13
14
15
16
17
18
# File 'lib/ber/identified/string.rb', line 10

def initialize(args)
  super

  return unless encoding == Encoding::BINARY

  current_encoding = encoding
  force_encoding('UTF-8')
  force_encoding(current_encoding) unless valid_encoding?
end

Instance Attribute Details

#ber_identifierObject

Returns the value of attribute ber_identifier.



8
9
10
# File 'lib/ber/identified/string.rb', line 8

def ber_identifier
  @ber_identifier
end