Class: BER::BerIdentifiedString
- Inherits:
-
String
- Object
- String
- BER::BerIdentifiedString
- Defined in:
- lib/ber/identified/string.rb
Overview
Wrapper around a String
Instance Attribute Summary collapse
-
#ber_identifier ⇒ Object
Returns the value of attribute ber_identifier.
Instance Method Summary collapse
-
#initialize(args) ⇒ BerIdentifiedString
constructor
A new instance of BerIdentifiedString.
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_identifier ⇒ Object
Returns the value of attribute ber_identifier.
8 9 10 |
# File 'lib/ber/identified/string.rb', line 8 def ber_identifier @ber_identifier end |