Class: Txbr::Project
- Inherits:
-
Object
- Object
- Txbr::Project
- Defined in:
- lib/txbr/project.rb
Instance Attribute Summary collapse
-
#braze_api_key ⇒ Object
readonly
Returns the value of attribute braze_api_key.
-
#braze_api_url ⇒ Object
readonly
Returns the value of attribute braze_api_url.
-
#handler_id ⇒ Object
readonly
Returns the value of attribute handler_id.
-
#source_lang ⇒ Object
readonly
Returns the value of attribute source_lang.
-
#strings_format ⇒ Object
readonly
Returns the value of attribute strings_format.
Instance Method Summary collapse
- #braze_api ⇒ Object
- #handler ⇒ Object
-
#initialize(options = {}) ⇒ Project
constructor
A new instance of Project.
- #transifex_api ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Project
Returns a new instance of Project.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/txbr/project.rb', line 8 def initialize( = {}) @braze_api_url = .fetch(:braze_api_url) @braze_api_key = .fetch(:braze_api_key) @handler_id = .fetch(:handler_id) @strings_format = .fetch(:strings_format) @source_lang = .fetch(:source_lang) @braze_api = [:braze_api] @transifex_api = [:transifex_api] end |
Instance Attribute Details
#braze_api_key ⇒ Object (readonly)
Returns the value of attribute braze_api_key.
5 6 7 |
# File 'lib/txbr/project.rb', line 5 def braze_api_key @braze_api_key end |
#braze_api_url ⇒ Object (readonly)
Returns the value of attribute braze_api_url.
5 6 7 |
# File 'lib/txbr/project.rb', line 5 def braze_api_url @braze_api_url end |
#handler_id ⇒ Object (readonly)
Returns the value of attribute handler_id.
5 6 7 |
# File 'lib/txbr/project.rb', line 5 def handler_id @handler_id end |
#source_lang ⇒ Object (readonly)
Returns the value of attribute source_lang.
6 7 8 |
# File 'lib/txbr/project.rb', line 6 def source_lang @source_lang end |
#strings_format ⇒ Object (readonly)
Returns the value of attribute strings_format.
6 7 8 |
# File 'lib/txbr/project.rb', line 6 def strings_format @strings_format end |
Instance Method Details
#braze_api ⇒ Object
19 20 21 |
# File 'lib/txbr/project.rb', line 19 def braze_api @braze_api ||= Txbr::BrazeApi.new(braze_api_key, braze_api_url) end |
#handler ⇒ Object
30 31 32 |
# File 'lib/txbr/project.rb', line 30 def handler @handler ||= Txbr.handler_for(self) end |
#transifex_api ⇒ Object
23 24 25 26 27 28 |
# File 'lib/txbr/project.rb', line 23 def transifex_api @transifex_api ||= Txgh::TransifexApi.create_from_credentials( Txbr::Config.transifex_api_username, Txbr::Config.transifex_api_password ) end |