Class: Transifex::ResourceComponents::TranslationComponents::String
- Inherits:
-
Object
- Object
- Transifex::ResourceComponents::TranslationComponents::String
- Includes:
- CrudRequests::Fetch, CrudRequests::Update, Utilities
- Defined in:
- lib/transifex/resource_components/translation_components/string.rb
Instance Attribute Summary collapse
-
#project_slug ⇒ Object
Returns the value of attribute project_slug.
-
#resource_slug ⇒ Object
Returns the value of attribute resource_slug.
-
#string_slug ⇒ Object
Returns the value of attribute string_slug.
-
#translation_slug ⇒ Object
Returns the value of attribute translation_slug.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project_slug = nil, resource_slug = nil, translation_slug = nil, translation_key = nil, translation_context = nil) ⇒ String
constructor
A new instance of String.
Methods included from CrudRequests::Update
Methods included from CrudRequests::Fetch
Constructor Details
#initialize(project_slug = nil, resource_slug = nil, translation_slug = nil, translation_key = nil, translation_context = nil) ⇒ String
Returns a new instance of String.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/transifex/resource_components/translation_components/string.rb', line 11 def initialize(project_slug = nil, resource_slug = nil, translation_slug = nil, translation_key = nil, translation_context = nil) raise MissingParametersError.new(["translation_key"]) if translation_key.nil? raise MissingParametersError.new(["translation_context"]) if translation_context.nil? raise MissingParametersError.new(["project_slug"]) if project_slug.nil? raise MissingParametersError.new(["resource_slug"]) if resource_slug.nil? raise MissingParametersError.new(["translation_slug"]) if translation_slug.nil? @project_slug = project_slug @resource_slug = resource_slug @translation_slug = translation_slug @string_slug = compute_source_entity_hash(translation_key, translation_context) end |
Instance Attribute Details
#project_slug ⇒ Object
Returns the value of attribute project_slug.
9 10 11 |
# File 'lib/transifex/resource_components/translation_components/string.rb', line 9 def project_slug @project_slug end |
#resource_slug ⇒ Object
Returns the value of attribute resource_slug.
9 10 11 |
# File 'lib/transifex/resource_components/translation_components/string.rb', line 9 def resource_slug @resource_slug end |
#string_slug ⇒ Object
Returns the value of attribute string_slug.
9 10 11 |
# File 'lib/transifex/resource_components/translation_components/string.rb', line 9 def string_slug @string_slug end |
#translation_slug ⇒ Object
Returns the value of attribute translation_slug.
9 10 11 |
# File 'lib/transifex/resource_components/translation_components/string.rb', line 9 def translation_slug @translation_slug end |
Class Method Details
.authors ⇒ Object
23 24 25 |
# File 'lib/transifex/resource_components/translation_components/string.rb', line 23 def self. [:project, :resource, :translation] end |