Sha256: b011777a12d14d52601fd131f5c119e62c02e07ac35f982457d3a1e4b345d91b
Contents?: true
Size: 1.03 KB
Versions: 14
Compression:
Stored size: 1.03 KB
Contents
module Bixby # Wraps a JSON Request # # @attr [String] operation Name of operation # @attr [Array] params Array of paramters; must be valid JSON types class JsonRequest include Jsonify include HttpClient attr_accessor :operation, :params # Create a new JsonRequest # # @param [String] operation Name of operation # @param [Array] params Array of parameters; must ve valid JSON types def initialize(operation, params) @operation = operation @params = params end # Convert object to String, useful for debugging # # @return [String] def to_s # :nocov: s = [] s << "JsonRequest:#{self.object_id}" s << " operation: #{self.operation}" s << " params: " + MultiJson.dump(self.params) s.join("\n") end # :nocov: def to_wire MultiJson.dump(self) end # Test if this object is equal to some other object # # @param [JsonRequest] other # # @return [Boolean] def ==(other) operation == other.operation && params == other.params end end # JsonRequest end # Bixby
Version data entries
14 entries across 14 versions & 1 rubygems