Sha256: 93daccd14fd2da2988d7c854bc8fdaeee1631b0b1a6d084e93ce44139fb49076

Contents?: true

Size: 540 Bytes

Versions: 2

Compression:

Stored size: 540 Bytes

Contents

module Chillout
  class Dispatcher
    class SendCreationsFailed < StandardError
    end

    def initialize(filter, server_side)
      @filter      = filter
      @server_side = server_side
    end

    def send_creations(creations)
      @server_side.send_creations(creations)
    rescue HttpClient::NotSent
      raise SendCreationsFailed.new
    end

    def check_api_connection
      response = @server_side.send_check
      CheckResult.new(response)
    rescue HttpClient::NotReceived => e
      CheckResult.new(e)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chillout-0.4.1 lib/chillout/dispatcher.rb
chillout-0.4.0 lib/chillout/dispatcher.rb