Class: ScoutApm::Remote::Message
- Inherits:
-
Object
- Object
- ScoutApm::Remote::Message
- Defined in:
- lib/scout_apm/remote/message.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #encode ⇒ Object
-
#initialize(type, command, *args) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(type, command, *args) ⇒ Message
Returns a new instance of Message.
8 9 10 11 12 |
# File 'lib/scout_apm/remote/message.rb', line 8 def initialize(type, command, *args) @type = type @command = command @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
6 7 8 |
# File 'lib/scout_apm/remote/message.rb', line 6 def args @args end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/scout_apm/remote/message.rb', line 5 def command @command end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/scout_apm/remote/message.rb', line 4 def type @type end |
Class Method Details
.decode(msg) ⇒ Object
14 15 16 |
# File 'lib/scout_apm/remote/message.rb', line 14 def self.decode(msg) Marshal.load(msg) end |
Instance Method Details
#encode ⇒ Object
18 19 20 |
# File 'lib/scout_apm/remote/message.rb', line 18 def encode Marshal.dump(self) end |