Class: Aggro::Message::CreateAggregate

Inherits:
Struct
  • Object
show all
Defined in:
lib/aggro/message/create_aggregate.rb

Overview

Public: Create aggregate message.

Constant Summary collapse

TYPE_CODE =
'08'.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



4
5
6
# File 'lib/aggro/message/create_aggregate.rb', line 4

def id
  @id
end

#senderObject

Returns the value of attribute sender

Returns:

  • (Object)

    the current value of sender



4
5
6
# File 'lib/aggro/message/create_aggregate.rb', line 4

def sender
  @sender
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



4
5
6
# File 'lib/aggro/message/create_aggregate.rb', line 4

def type
  @type
end

Class Method Details

.parse(string) ⇒ Object



7
8
9
# File 'lib/aggro/message/create_aggregate.rb', line 7

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

Instance Method Details

#to_sObject



11
12
13
# File 'lib/aggro/message/create_aggregate.rb', line 11

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