Sha256: 11188bb000db2c38938fb2087b1d6a6471ff74b96e53ca766b653a4aab2486e8

Contents?: true

Size: 677 Bytes

Versions: 1

Compression:

Stored size: 677 Bytes

Contents

require "json"
require "datarank/version"
require "datarank/client"

module Datarank
  class << self

    # A Datarank::Client, used when calling methods on the Datarank module itself.
    #
    # @return [Datarank::Client]
    def client(api_key=nil, api_version=nil, options={})
      @client ||= Datarank::Client.new(api_key, api_version, options)
    end

    def respond_to?(method_name, include_private = false)
      client.respond_to?(method_name, include_private) || super
    end

    private

    def method_missing(method_name, *args, &block)
      return super unless client.respond_to?(method_name)
      client.send(method_name, *args, &block)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datarank-0.2 lib/datarank.rb