Class: MeshChat::Message::Relay
- Defined in:
- lib/meshchat/message/relay.rb
Instance Attribute Summary
Attributes inherited from Base
#message, #payload, #sender_location, #sender_name, #sender_uid, #time_recieved
Instance Method Summary collapse
- #display ⇒ Object
- #handle ⇒ Object
-
#initialize(message: nil, sender_name: nil, sender_location: nil, sender_uid: nil, time_recieved: nil, payload: nil, destination: '', hops: []) ⇒ Relay
constructor
A new instance of Relay.
- #respond ⇒ Object
Methods inherited from Base
#client, #client_version, #render, #type
Constructor Details
#initialize(message: nil, sender_name: nil, sender_location: nil, sender_uid: nil, time_recieved: nil, payload: nil, destination: '', hops: []) ⇒ Relay
Returns a new instance of Relay.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/meshchat/message/relay.rb', line 4 def initialize( message: nil, sender_name: nil, sender_location: nil, sender_uid: nil, time_recieved: nil, payload: nil, destination: '', hops: []) # package the original message = { message: , destination: destination, hops: hops } super( message: , sender_name: sender_name, sender_location: sender_location, sender_uid: sender_uid, time_recieved: time_recieved, payload: payload) end |
Instance Method Details
#display ⇒ Object
30 |
# File 'lib/meshchat/message/relay.rb', line 30 def display; end |
#handle ⇒ Object
32 33 34 35 |
# File 'lib/meshchat/message/relay.rb', line 32 def handle respond return end |
#respond ⇒ Object
37 38 39 |
# File 'lib/meshchat/message/relay.rb', line 37 def respond end |