Class: Txdb::TransifexProject

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ TransifexProject

Returns a new instance of TransifexProject.



8
9
10
11
12
13
14
15
# File 'lib/txdb/transifex_project.rb', line 8

def initialize(options = {})
  @organization = options.fetch(:organization)
  @project_slug = options.fetch(:project_slug)
  @username = options.fetch(:username)
  @password = options.fetch(:password)
  @webhook_secret = options.fetch(:webhook_secret)
  @api = Txgh::TransifexApi.create_from_credentials(username, password)
end

Instance Attribute Details

#apiObject (readonly)

Returns the value of attribute api.



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

def api
  @api
end

#organizationObject (readonly)

Returns the value of attribute organization.



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

def organization
  @organization
end

#passwordObject (readonly)

Returns the value of attribute password.



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

def password
  @password
end

#project_slugObject (readonly)

Returns the value of attribute project_slug.



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

def project_slug
  @project_slug
end

#usernameObject (readonly)

Returns the value of attribute username.



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

def username
  @username
end

#webhook_secretObject (readonly)

Returns the value of attribute webhook_secret.



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

def webhook_secret
  @webhook_secret
end