Class: Transifex::Account

Inherits:
Object
  • Object
show all
Includes:
Request
Defined in:
lib/transifex/account.rb

Instance Method Summary collapse

Methods included from Request

#connection, #get, #set_credentials

Constructor Details

#initialize(username, password) ⇒ Account

Returns a new instance of Account.



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

def initialize(username, password)
  set_credentials(username, password)
end

Instance Method Details

#project(name) ⇒ Object



15
16
17
18
19
# File 'lib/transifex/account.rb', line 15

def project(name)
  data = get("/project/#{name}/")
  return if data == 'Not Found'
  Project.new(data, self)
end

#projectsObject



11
12
13
# File 'lib/transifex/account.rb', line 11

def projects
  initializ_projects(get('/projects/'))
end