Class: StructFu::String

Inherits:
String
  • Object
show all
Defined in:
lib/packetfu/structfu.rb

Overview

Strings are just like regular strings, except it comes with a read() function so that it behaves like other StructFu elements.

Instance Method Summary collapse

Instance Method Details

#read(str) ⇒ Object



198
199
200
201
202
# File 'lib/packetfu/structfu.rb', line 198

def read(str)
  str = str.to_s
  self.replace str
  self
end