Sha256: 301b79ffa65c02b92c1cd2178ce26106e82b56a293313b912d5cbc1ee6401b65

Contents?: true

Size: 346 Bytes

Versions: 3

Compression:

Stored size: 346 Bytes

Contents

module Aggro
  module Message
    # Public: Create aggregate message.
    class CreateAggregate < Struct.new(:sender, :id, :type)
      TYPE_CODE = '08'.freeze

      def self.parse(string)
        new string[2..37], string[38..73], string[74..-1]
      end

      def to_s
        "#{TYPE_CODE}#{sender}#{id}#{type}"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aggro-0.0.4 lib/aggro/message/create_aggregate.rb
aggro-0.0.3 lib/aggro/message/create_aggregate.rb
aggro-0.0.2 lib/aggro/message/create_aggregate.rb