Sha256: b7414ac89ba4b3893dd9a47cd28c1c58c5a314b44140e7e82bf2a6c510066a53
Contents?: true
Size: 1.09 KB
Versions: 20
Compression:
Stored size: 1.09 KB
Contents
module Harpy class Exception < ::Exception; end class EntryPointRequired < Exception; end class UrlRequired < Exception; end class BodyToBig < Exception; end class ClientTimeout < Exception; end class ClientError < Exception; end class Unauthorized < Exception; end class InvalidResponseCode < Exception; end autoload :Client, "harpy/client" autoload :Collection, "harpy/collection" autoload :EntryPoint, "harpy/entry_point" autoload :Resource, "harpy/resource" autoload :BodyToBig, "harpy/resource" autoload :UnknownResponseCode, "harpy/resource" def self.client=(new_client) @client = new_client end def self.client @client ||= Client.new end def self.entry_point_url=(url) @entry_point = EntryPoint.new url end def self.entry_point_url @entry_point.url if @entry_point end def self.entry_point=(value) @entry_point = value end def self.entry_point @entry_point || raise(EntryPointRequired, 'you can setup one with Harpy.entry_point_url = "http://localhost"') end def self.reset @client = nil @entry_point = nil end end
Version data entries
20 entries across 20 versions & 1 rubygems