class BlockScore::Dispatch

Public Class Methods

new(resource, response) click to toggle source
# File lib/blockscore/dispatch.rb, line 7
def initialize(resource, response)
  @fingerprint = Fingerprint.new(resource, response.body)
end

Public Instance Methods

call() click to toggle source
# File lib/blockscore/dispatch.rb, line 11
def call
  Util.send(builder, resource, data)
end

Private Instance Methods

builder() click to toggle source
# File lib/blockscore/dispatch.rb, line 17
def builder
  resource_array? ? :create_array : :create_object
end
resource_array?() click to toggle source

array formatted response

# File lib/blockscore/dispatch.rb, line 22
def resource_array?
  data.is_a?(Array)
end