Class: Encoding

Inherits:
Object
  • Object
show all
Defined in:
lib/mqtt/patches/string_encoding.rb

Constant Summary collapse

UTF_8 =
Encoding.new('UTF-8')
ASCII_8BIT =
Encoding.new('ASCII-8BIT')

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Encoding

Returns a new instance of Encoding.



22
23
24
# File 'lib/mqtt/patches/string_encoding.rb', line 22

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



20
21
22
# File 'lib/mqtt/patches/string_encoding.rb', line 20

def name
  @name
end

Instance Method Details

#to_sObject



26
27
28
# File 'lib/mqtt/patches/string_encoding.rb', line 26

def to_s
  @name
end