Sha256: d5829d129535300ae815185526485340c3346ca7fd71ab0fb996c80abd300614

Contents?: true

Size: 1.62 KB

Versions: 6

Compression:

Stored size: 1.62 KB

Contents

require 'twitter/action_factory'
require 'twitter/client'
require 'twitter/configurable'
require 'twitter/configuration'
require 'twitter/cursor'
require 'twitter/default'
require 'twitter/direct_message'
require 'twitter/entity'
require 'twitter/entity/hashtag'
require 'twitter/entity/url'
require 'twitter/entity/user_mention'
require 'twitter/geo_factory'
require 'twitter/language'
require 'twitter/list'
require 'twitter/media_factory'
require 'twitter/metadata'
require 'twitter/oembed'
require 'twitter/place'
require 'twitter/profile_banner'
require 'twitter/rate_limit'
require 'twitter/relationship'
require 'twitter/saved_search'
require 'twitter/search_results'
require 'twitter/settings'
require 'twitter/size'
require 'twitter/source_user'
require 'twitter/suggestion'
require 'twitter/target_user'
require 'twitter/trend'
require 'twitter/tweet'
require 'twitter/user'

module Twitter
  class << self
    include Twitter::Configurable

    # Delegate to a Twitter::Client
    #
    # @return [Twitter::Client]
    def client
      @client = Twitter::Client.new(options) unless defined?(@client) && @client.hash == options.hash
      @client
    end

    def respond_to_missing?(method_name, include_private=false); client.respond_to?(method_name, include_private); end if RUBY_VERSION >= "1.9"
    def respond_to?(method_name, include_private=false); client.respond_to?(method_name, include_private) || super; end if RUBY_VERSION < "1.9"

  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

Twitter.setup

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
twitter-4.6.2 lib/twitter.rb
twitter-4.6.1 lib/twitter.rb
twitter-4.6.0 lib/twitter.rb
twitter-4.5.0 lib/twitter.rb
twitter-4.4.4 lib/twitter.rb
twitter-4.4.3 lib/twitter.rb