Class: EventMachine::Twitter::Proxy
- Inherits:
-
Object
- Object
- EventMachine::Twitter::Proxy
- Defined in:
- lib/em-twitter/proxy.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #header ⇒ Object
-
#initialize(options = {}) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
#initialize(options = {}) ⇒ Proxy
Returns a new instance of Proxy.
7 8 9 10 11 |
# File 'lib/em-twitter/proxy.rb', line 7 def initialize( = {}) @user = .delete(:user) @password = .delete(:password) @uri = .delete(:uri) end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
5 6 7 |
# File 'lib/em-twitter/proxy.rb', line 5 def password @password end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/em-twitter/proxy.rb', line 5 def uri @uri end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/em-twitter/proxy.rb', line 5 def user @user end |
Instance Method Details
#header ⇒ Object
13 14 15 |
# File 'lib/em-twitter/proxy.rb', line 13 def header ["#{@user}:#{@password}"].pack('m').delete("\r\n") if credentials? end |