Class: Aggro::Message::GetEvents

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

Overview

Public: Get events message.

Constant Summary collapse

TYPE_CODE =
'09'.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#from_versionObject

Returns the value of attribute from_version

Returns:

  • (Object)

    the current value of from_version



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

def from_version
  @from_version
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



4
5
6
# File 'lib/aggro/message/get_events.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/get_events.rb', line 4

def sender
  @sender
end

Class Method Details

.parse(string) ⇒ Object



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

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

Instance Method Details

#to_sObject



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

def to_s
  "#{TYPE_CODE}#{sender}#{id}#{from_version || 0}"
end