Sha256: a7a21ec0138c897baefcb4c93ec4291bc86bf30ac737fc61d289114cc4c247a2

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

module CurrencyCloud
  class Client
    def initialize(resource)
      @resource = resource
    end

    def get(url, params={})
      request.get(build_url(url), params)
    end

    def post(url, params={})
      request.post(build_url(url), params)
    end

    def build_url(url)
      "#{resource}/#{url}"
    end

    def request
      RequestHandler.new
    end

    private

    attr_reader :resource
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
currency_cloud-0.7.2 lib/currency_cloud/client.rb