class Transifex::ResourceComponents::Source

Attributes

project_slug[RW]
resource_slug[RW]
source_slug[RW]

Public Class Methods

new(project_slug = nil, resource_slug = nil, translation_key = nil, translation_context = "") click to toggle source
# 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
parents() click to toggle source
# File lib/tx-ruby/resource_components/source.rb, line 18
def self.parents
  [:project, :resource]      
end