Class: Aggro::Message::StartSaga
- Inherits:
-
Struct
- Object
- Struct
- Aggro::Message::StartSaga
- Defined in:
- lib/aggro/message/start_saga.rb
Overview
Public: Start saga message.
Constant Summary collapse
- TYPE_CODE =
'13'.freeze
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#id ⇒ Object
Returns the value of attribute id.
-
#sender ⇒ Object
Returns the value of attribute sender.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details
4 5 6 |
# File 'lib/aggro/message/start_saga.rb', line 4 def details @details end |
#id ⇒ Object
Returns the value of attribute id
4 5 6 |
# File 'lib/aggro/message/start_saga.rb', line 4 def id @id end |
#sender ⇒ Object
Returns the value of attribute sender
4 5 6 |
# File 'lib/aggro/message/start_saga.rb', line 4 def sender @sender end |
Class Method Details
.parse(string) ⇒ Object
7 8 9 |
# File 'lib/aggro/message/start_saga.rb', line 7 def self.parse(string) new string[2..37], string[38..73], parse_details(string[74..-1]) end |
.parse_details(details) ⇒ Object
11 12 13 |
# File 'lib/aggro/message/start_saga.rb', line 11 def self.parse_details(details) Marshal.load details end |
Instance Method Details
#args ⇒ Object
15 16 17 |
# File 'lib/aggro/message/start_saga.rb', line 15 def args details[:args] end |
#name ⇒ Object
19 20 21 |
# File 'lib/aggro/message/start_saga.rb', line 19 def name details[:name] end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/aggro/message/start_saga.rb', line 23 def to_s "#{TYPE_CODE}#{sender}#{id}#{Marshal.dump details}" end |