Class: Transifex::Account
- Inherits:
-
Object
- Object
- Transifex::Account
- Includes:
- Request
- Defined in:
- lib/transifex/account.rb
Instance Method Summary collapse
-
#initialize(username, password) ⇒ Account
constructor
A new instance of Account.
- #project(name) ⇒ Object
- #projects ⇒ Object
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 |
#projects ⇒ Object
11 12 13 |
# File 'lib/transifex/account.rb', line 11 def projects initializ_projects(get('/projects/')) end |