Module: RubyLokaliseApi::Utils::Keys
- Included in:
- Collections::Base, Resources::Base
- Defined in:
- lib/ruby_lokalise_api/utils/keys.rb
Instance Method Summary collapse
-
#collection_key_for(klass:) ⇒ String
Retrieves the DATA_KEY for collections.
-
#data_key_for(klass:) ⇒ String
Retrieves the DATA_KEY for resources.
Instance Method Details
#collection_key_for(klass:) ⇒ String
Retrieves the DATA_KEY for collections. DATA_KEY specifies the key in the API response containing the actual data.
22 23 24 |
# File 'lib/ruby_lokalise_api/utils/keys.rb', line 22 def collection_key_for(klass:) retrieve_data_key("RubyLokaliseApi::Collections::#{klass}::DATA_KEY", klass) end |
#data_key_for(klass:) ⇒ String
Retrieves the DATA_KEY for resources. DATA_KEY specifies the key in the API response containing the actual data.
13 14 15 |
# File 'lib/ruby_lokalise_api/utils/keys.rb', line 13 def data_key_for(klass:) retrieve_data_key("RubyLokaliseApi::Resources::#{klass}::DATA_KEY", klass) end |