Class: Torckapi::Response::Error

Inherits:
Base
  • Object
show all
Defined in:
lib/torckapi/response/error.rb

Overview

Error response

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#info_hashString (readonly)

Returns 40-char hexadecimal string.

Returns:

  • (String)

    40-char hexadecimal string



13
14
15
# File 'lib/torckapi/response/error.rb', line 13

def info_hash
  @info_hash
end

#info_hashesArray<String> (readonly)

Returns an array of 40-char hexadecimal strings.

Returns:

  • (Array<String>)

    an array of 40-char hexadecimal strings



13
# File 'lib/torckapi/response/error.rb', line 13

attr_reader :info_hash, :info_hashes, :message

#messageObject (readonly)

Returns the value of attribute message.



13
# File 'lib/torckapi/response/error.rb', line 13

attr_reader :info_hash, :info_hashes, :message

Class Method Details

.from_udp(info_hashes, data) ⇒ Torckapi::Response::Error

Construct response object from udp response data

Parameters:

  • info_hashes (String, Array<String>)

    a 40-char hexadecimal string or an array of those

  • data (String)

    UDP response data (omit action and transaction_id)

Returns:



19
20
21
# File 'lib/torckapi/response/error.rb', line 19

def self.from_udp info_hashes, data
  new(info_hashes, data || "")
end