Class: RubyTapasDownloader::Login

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_tapas_downloader/login.rb

Overview

Perform Login in Ruby Tapas.

Login must be performed before any attempt to download files.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent, email, password) ⇒ Login

Returns a new instance of Login.



14
15
16
17
18
# File 'lib/ruby_tapas_downloader/login.rb', line 14

def initialize(agent, email, password)
  @agent    = agent
  @email    = email
  @password = password
end

Instance Attribute Details

#agentMechanize (readonly)

Returns the Mechanize agent.

Returns:

  • (Mechanize)

    the Mechanize agent.



6
7
8
# File 'lib/ruby_tapas_downloader/login.rb', line 6

def agent
  @agent
end

#emailString (readonly)

Returns the e-mail for the user.

Returns:

  • (String)

    the e-mail for the user.



9
10
11
# File 'lib/ruby_tapas_downloader/login.rb', line 9

def email
  @email
end

#passwordString (readonly)

Returns the password for the user.

Returns:

  • (String)

    the password for the user.



12
13
14
# File 'lib/ruby_tapas_downloader/login.rb', line 12

def password
  @password
end

Instance Method Details

#loginObject

Perform login.



21
22
23
24
25
26
# File 'lib/ruby_tapas_downloader/login.rb', line 21

def 
  RubyTapasDownloader.logger.info 'Logging in...'
  
  
  
end