Module: Argus::CFields

Included in:
NavOptionChecksum, NavOptionDemo, NavOptionVisionDetect
Defined in:
lib/argus/cfields.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


6
7
8
# File 'lib/argus/cfields.rb', line 6

def self.included(base)
  base.send :extend, ClassMethods
end

Instance Method Details

#initialize(*args) ⇒ Object


10
11
12
13
# File 'lib/argus/cfields.rb', line 10

def initialize(*args)
  super
  @data = unpack_data(args.first)
end

#unpack_data(data) ⇒ Object


15
16
17
# File 'lib/argus/cfields.rb', line 15

def unpack_data(data)
  @data = data.unpack(self.class.format_string)
end