module Takumi::Packet::Dsl::ClassMethods

Public Instance Methods

decode(packet) click to toggle source
# File lib/takumi/packet/dsl.rb, line 17
def decode(packet)
  attrs = ::Takumi::Packet.decode(self, packet)
  new(attrs)
end
field(name, type) click to toggle source
# File lib/takumi/packet/dsl.rb, line 9
def field(name, type)
  fields << {name: name, type: type}
end
fields() click to toggle source
# File lib/takumi/packet/dsl.rb, line 13
def fields
  @fields ||= []
end