Class: RubySMB::Field::String16

Inherits:
BinData::String
  • Object
show all
Defined in:
lib/ruby_smb/field/string16.rb

Overview

Represents a String in UTF-16LE

Instance Method Summary collapse

Instance Method Details

#assign(val) ⇒ Object



5
6
7
# File 'lib/ruby_smb/field/string16.rb', line 5

def assign(val)
  super(val.encode('utf-16le'))
end

#snapshotObject



9
10
11
# File 'lib/ruby_smb/field/string16.rb', line 9

def snapshot
  super.force_encoding('utf-16le')
end