Class: Syncano::Packets::Auth
Overview
Class representing auth packets used in communication with the Sync Server
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Base
Instance Method Summary collapse
-
#auth? ⇒ TrueClass, FalseClass
Returns true if is an auth packet.
-
#initialize(attributes) ⇒ Auth
constructor
Constructor for Syncano::Packets::Auth object.
Methods inherited from Base
#call_response?, instantize_packet, #message?, #notification?, #ping?
Constructor Details
#initialize(attributes) ⇒ Auth
Constructor for Syncano::Packets::Auth object
9 10 11 12 13 14 |
# File 'lib/syncano/packets/auth.rb', line 9 def initialize(attributes) super(attributes) self. = 'auth' self.status = attributes[:result] self.error = attributes[:error] end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
5 6 7 |
# File 'lib/syncano/packets/auth.rb', line 5 def error @error end |
#message_id ⇒ Object
Returns the value of attribute message_id.
5 6 7 |
# File 'lib/syncano/packets/auth.rb', line 5 def @message_id end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/syncano/packets/auth.rb', line 5 def status @status end |
Instance Method Details
#auth? ⇒ TrueClass, FalseClass
Returns true if is an auth packet
18 19 20 |
# File 'lib/syncano/packets/auth.rb', line 18 def auth? true end |