Class: Mozier

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

Constant Summary collapse

URLS =
{:login => "https://mozy.com/login"}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ Mozier

Returns a new instance of Mozier.



13
14
15
16
17
# File 'lib/mozier/mozier.rb', line 13

def initialize(username,password)
  @username = username
  @password = password
  @agent = Mechanize.new
end

Instance Attribute Details

#agentObject

Returns the value of attribute agent.



7
8
9
# File 'lib/mozier/mozier.rb', line 7

def agent
  @agent
end

#infoObject

Returns the value of attribute info.



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

def info
  @info
end

#logged_in_pageObject

Returns the value of attribute logged_in_page.



8
9
10
# File 'lib/mozier/mozier.rb', line 8

def logged_in_page
  @logged_in_page
end

#passwordObject

Returns the value of attribute password.



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

def password
  @password
end

#usernameObject

Returns the value of attribute username.



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

def username
  @username
end

Instance Method Details

#reload_infoObject



42
43
44
45
46
# File 'lib/mozier/mozier.rb', line 42

def reload_info
  @info = nil
  @logged_in_page = nil
  info
end