Class: Twitter::Config
- Inherits:
-
Object
- Object
- Twitter::Config
- Includes:
- ClassUtilMixin
- Defined in:
- lib/vendor/twitter/lib/twitter/config.rb
Overview
Represents global configuration for Twitter::Client. Can override the following configuration options:
-
protocol
-:http
,:https
or:ssl
supported.:ssl
is an alias for:https
. Defaults to:ssl
-
host
- hostname to connect to for the Twitter service. Defaults to'twitter.com'
. -
port
- port to connect to for the Twitter service. Defaults to443
. -
proxy_host
- proxy host to use. Defaults to nil. -
proxy_port
- proxy host to use. Defaults to nil. -
proxy_user
- proxy username to use. Defaults to nil. -
proxy_pass
- proxy password to use. Defaults to nil. -
user_agent
- user agent string to use for each request of the HTTP header. -
application_name
- name of your client application. Defaults to ‘Twitter4R’ -
application_version
- version of your client application. Defaults to currentTwitter::Version.to_version
. -
application_url
- URL of your client application. Defaults to twitter4r.rubyforge.org. -
source
- the source id given to you by Twitter to identify your application in their web interface. Note: you must contact Twitter.com developer directly so they can configure their servers appropriately.
Constant Summary collapse
- @@ATTRIBUTES =
[ :protocol, :host, :port, :search_protocol, :search_host, :search_port, :proxy_host, :proxy_port, :proxy_user, :proxy_pass, :user_agent, :application_name, :application_version, :application_url, :source, ]
Instance Method Summary collapse
-
#eql?(other) ⇒ Boolean
Override of Object#eql? to ensure RSpec specifications run correctly.
Methods included from ClassUtilMixin
Instance Method Details
#eql?(other) ⇒ Boolean
Override of Object#eql? to ensure RSpec specifications run correctly. Also done to follow Ruby best practices.
42 43 44 45 46 47 48 |
# File 'lib/vendor/twitter/lib/twitter/config.rb', line 42 def eql?(other) return true if self == other @@ATTRIBUTES.each do |att| return false unless self.send(att).eql?(other.send(att)) end true end |