Class: EMRPC::Pid::Marshallable
Overview
The purpose of that class is to discard all the class information about Pid before marshalling it. The only thing we want to pass around is pid.uuid.
Instance Attribute Summary collapse
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#_uid(uuid = @uuid) ⇒ Object
shorter uuid for pretty output.
-
#decode_b381b571_1ab2_5889_8221_855dbbc76242(host_pid) ⇒ Object
TODO: support unknown pids (maybe instantiate RemotePid instance or ProxyPid or something).
-
#initialize(uuid) ⇒ Marshallable
constructor
A new instance of Marshallable.
- #inspect ⇒ Object
Constructor Details
#initialize(uuid) ⇒ Marshallable
Returns a new instance of Marshallable.
95 96 97 |
# File 'lib/emrpc/util/codec.rb', line 95 def initialize(uuid) @uuid = uuid end |
Instance Attribute Details
#uuid ⇒ Object
Returns the value of attribute uuid.
94 95 96 |
# File 'lib/emrpc/util/codec.rb', line 94 def uuid @uuid end |
Instance Method Details
#_uid(uuid = @uuid) ⇒ Object
shorter uuid for pretty output
108 109 110 |
# File 'lib/emrpc/util/codec.rb', line 108 def _uid(uuid = @uuid) uuid && uuid[0,6] end |
#decode_b381b571_1ab2_5889_8221_855dbbc76242(host_pid) ⇒ Object
TODO: support unknown pids (maybe instantiate RemotePid instance or ProxyPid or something)
99 100 101 |
# File 'lib/emrpc/util/codec.rb', line 99 def decode_b381b571_1ab2_5889_8221_855dbbc76242(host_pid) host_pid.find_pid(@uuid) end |
#inspect ⇒ Object
103 104 105 |
# File 'lib/emrpc/util/codec.rb', line 103 def inspect "#<Pid::Marshallable:#{_uid}>" end |