Sha256: 65fb9836e79c9e674b50842810c24167433e9452b32fac5cb435f55622eee2ac

Contents?: true

Size: 711 Bytes

Versions: 3

Compression:

Stored size: 711 Bytes

Contents

require File.expand_path('../douban_api/error', __FILE__)
require File.expand_path('../douban_api/configuration', __FILE__)
require File.expand_path('../douban_api/api', __FILE__)
require File.expand_path('../douban_api/client', __FILE__)

module Douban
  extend Configuration

  # Alias for Douban::Client.new
  #
  # @return [Douban::Client]
  def self.client(options={})
    Douban::Client.new(options)
  end

  # Delegate to Douban::Client
  def self.method_missing(method, *args, &block)
    return super unless client.respond_to?(method)
    client.send(method, *args, &block)
  end

  # Delegate to Douban::Client
  def self.respond_to?(method)
    return client.respond_to?(method) || super
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
douban_api-0.1.2 lib/douban_api.rb
douban_api-0.1.1 lib/douban_api.rb
douban_api-0.1.0 lib/douban_api.rb