Class: Txgh::Config::ConfigPair
- Inherits:
-
Object
- Object
- Txgh::Config::ConfigPair
- Defined in:
- lib/txgh/config/config_pair.rb
Instance Attribute Summary collapse
-
#project_config ⇒ Object
readonly
Returns the value of attribute project_config.
-
#repo_config ⇒ Object
readonly
Returns the value of attribute repo_config.
Instance Method Summary collapse
- #github_api ⇒ Object
- #github_repo ⇒ Object
-
#initialize(project_config, repo_config) ⇒ ConfigPair
constructor
A new instance of ConfigPair.
- #transifex_api ⇒ Object
- #transifex_project ⇒ Object
Constructor Details
#initialize(project_config, repo_config) ⇒ ConfigPair
Returns a new instance of ConfigPair.
6 7 8 9 |
# File 'lib/txgh/config/config_pair.rb', line 6 def initialize(project_config, repo_config) @project_config = project_config @repo_config = repo_config end |
Instance Attribute Details
#project_config ⇒ Object (readonly)
Returns the value of attribute project_config.
4 5 6 |
# File 'lib/txgh/config/config_pair.rb', line 4 def project_config @project_config end |
#repo_config ⇒ Object (readonly)
Returns the value of attribute repo_config.
4 5 6 |
# File 'lib/txgh/config/config_pair.rb', line 4 def repo_config @repo_config end |
Instance Method Details
#github_api ⇒ Object
29 30 31 32 33 |
# File 'lib/txgh/config/config_pair.rb', line 29 def github_api @github_api ||= Txgh::GithubApi.create_from_credentials( repo_config['api_username'], repo_config['api_token'] ) end |
#github_repo ⇒ Object
11 12 13 14 15 |
# File 'lib/txgh/config/config_pair.rb', line 11 def github_repo @github_repo ||= Txgh::GithubRepo.new( repo_config, github_api ) end |
#transifex_api ⇒ Object
23 24 25 26 27 |
# File 'lib/txgh/config/config_pair.rb', line 23 def transifex_api @transifex_api ||= Txgh::TransifexApi.create_from_credentials( project_config['api_username'], project_config['api_password'] ) end |
#transifex_project ⇒ Object
17 18 19 20 21 |
# File 'lib/txgh/config/config_pair.rb', line 17 def transifex_project @transifex_project ||= Txgh::TransifexProject.new( project_config, transifex_api ) end |