Sha256: d7db0732b89903a313152a8546e4fe113e8b72195236301b2edb72f4d4b23d35

Contents?: true

Size: 692 Bytes

Versions: 1

Compression:

Stored size: 692 Bytes

Contents

require 'httparty'

# These three are the only classes that should be accessed directly
require 'rev-api/api'

module Rev
  class << self
    # Alias for Rev::Api.new
    #
    # @return [Rev::Api]
    def new(client_api_key, user_api_key, host = Rev::Api::PRODUCTION_HOST)
      Rev::Api.new(client_api_key, user_api_key, host)
    end

    # Delegate to Rev::Api
    #
    def method_missing(method, *args, &block)
      return super unless new.respond_to?(method)
      new.send(method, *args, &block)
    end

    def respond_to?(method, include_private = false)
      new.respond_to?(method, include_private) || super(method, include_private)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rev-api-2.5.0 lib/rev-api.rb