Class: Transifex::ResourceComponents::Source
- Inherits:
-
Object
- Object
- Transifex::ResourceComponents::Source
- Defined in:
- lib/tx-ruby/resource_components/source.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.
-
#source_slug ⇒ Object
Returns the value of attribute source_slug.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project_slug = nil, resource_slug = nil, translation_key = nil, translation_context = "") ⇒ Source
constructor
A new instance of Source.
Methods included from CrudRequests::Update
Methods included from CrudRequests::Fetch
Constructor Details
#initialize(project_slug = nil, resource_slug = nil, translation_key = nil, translation_context = "") ⇒ Source
Returns a new instance of Source.
10 11 12 13 14 15 16 17 |
# File 'lib/tx-ruby/resource_components/source.rb', line 10 def initialize(project_slug = nil, resource_slug = nil, translation_key = nil, translation_context = "") raise MissingParametersError.new(["project_slug"]) if project_slug.nil? raise MissingParametersError.new(["resource_slug"]) if resource_slug.nil? raise MissingParametersError.new(["translation_key"]) if translation_key.nil? @project_slug = project_slug @resource_slug = resource_slug @source_slug = compute_source_entity_hash(translation_key, translation_context) end |
Instance Attribute Details
#project_slug ⇒ Object
Returns the value of attribute project_slug.
8 9 10 |
# File 'lib/tx-ruby/resource_components/source.rb', line 8 def project_slug @project_slug end |
#resource_slug ⇒ Object
Returns the value of attribute resource_slug.
8 9 10 |
# File 'lib/tx-ruby/resource_components/source.rb', line 8 def resource_slug @resource_slug end |
#source_slug ⇒ Object
Returns the value of attribute source_slug.
8 9 10 |
# File 'lib/tx-ruby/resource_components/source.rb', line 8 def source_slug @source_slug end |
Class Method Details
.parents ⇒ Object
18 19 20 |
# File 'lib/tx-ruby/resource_components/source.rb', line 18 def self.parents [:project, :resource] end |