Class: Pork::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/pork_sandwich/auth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, password, user_agent = '') ⇒ Auth

Returns a new instance of Auth.



5
6
7
# File 'lib/pork_sandwich/auth.rb', line 5

def initialize(username, password, user_agent = '')
  @auth = Twitter::Base.new(Twitter::HTTPAuth.new(username, password, :user_agent => user_agent))
end

Instance Attribute Details

#authObject

Returns the value of attribute auth.



3
4
5
# File 'lib/pork_sandwich/auth.rb', line 3

def auth
  @auth
end

#passwordObject (readonly)

Returns the value of attribute password.



4
5
6
# File 'lib/pork_sandwich/auth.rb', line 4

def password
  @password
end

#usernameObject (readonly)

Returns the value of attribute username.



4
5
6
# File 'lib/pork_sandwich/auth.rb', line 4

def username
  @username
end