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


171
172
173
174
175
# File 'lib/packetfu/structfu.rb', line 171

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