Class: EventMachine::Twitter::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/em-twitter/proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @user     = options.delete(:user)
  @password = options.delete(:password)
  @uri      = options.delete(:uri)
end

Instance Attribute Details

#passwordObject (readonly)

Returns the value of attribute password.



5
6
7
# File 'lib/em-twitter/proxy.rb', line 5

def password
  @password
end

#uriObject (readonly)

Returns the value of attribute uri.



5
6
7
# File 'lib/em-twitter/proxy.rb', line 5

def uri
  @uri
end

#userObject (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

#headerObject



13
14
15
# File 'lib/em-twitter/proxy.rb', line 13

def header
  ["#{@user}:#{@password}"].pack('m').delete("\r\n") if credentials?
end