class Syncano::Packets::Message
Class representing message packets used in communication with the Sync Server
Attributes
data[RW]
id[RW]
source[RW]
target[RW]
Public Class Methods
new(attributes)
click to toggle source
Constructor for Syncano::Packets::Message
object @param [Hash] attributes
Calls superclass method
Syncano::Packets::Base::new
# File lib/syncano/packets/message.rb, line 9 def initialize(attributes) super(attributes) self.id = attributes[:id] self.source = attributes[:source] self.target = attributes[:target] self.data = attributes[:data] end
Public Instance Methods
message?()
click to toggle source
Returns true if is a message packet @return [TrueClass, FalseClass]
# File lib/syncano/packets/message.rb, line 25 def message? true end
notification?()
click to toggle source
Returns true if is a notification packet @return [TrueClass, FalseClass]
# File lib/syncano/packets/message.rb, line 19 def notification? true end