Sha256: 2b6144dde900e83d1a5acb96630e9c7cd02b89020e93718b7b3a43bfda6dc3aa
Contents?: true
Size: 860 Bytes
Versions: 9
Compression:
Stored size: 860 Bytes
Contents
class Syncano module Packets # Class representing call response packets used in communication with the Sync Server class CallResponse < Syncano::Packets::Base attr_reader :message_id, :data, :result # Constructor for Syncano::Packets::CallResponse object # @param [Hash] attributes def initialize(attributes) super(attributes) self.message_id = attributes[:message_id] self.data = attributes[:data] self.result = attributes[:result] end # Prepares hash in response format # @return [Hash] def to_response data.merge(result: result) end # Returns true if is a call response packet # @return [TrueClass, FalseClass] def call_response? true end private attr_writer :message_id, :data, :result end end end
Version data entries
9 entries across 9 versions & 1 rubygems