class Queued::Client
Public Class Methods
new(url, options = {})
click to toggle source
# File lib/queued/client.rb, line 6 def initialize(url, options = {}) @url = url @auth = options[:auth] @conn = Faraday.new(:url => @url) do |conn| conn.use Middleware::Errors conn.request :json conn.response :json, :content_type => /\bjson$/ conn.adapter Faraday.default_adapter end if @auth @conn.basic_auth('', @auth) end end
Public Instance Methods
queue(name)
click to toggle source
# File lib/queued/client.rb, line 24 def queue(name) Queue.new(self, name) end