Class: Transifex::ProjectComponents::Language

Inherits:
Object
  • Object
show all
Includes:
CrudRequests::Delete, CrudRequests::Fetch, CrudRequests::Update
Defined in:
lib/tx-ruby/project_components/language.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CrudRequests::Delete

included

Methods included from CrudRequests::Update

included

Methods included from CrudRequests::Fetch

included

Constructor Details

#initialize(project_slug = nil, language_code = nil) ⇒ Language

Returns a new instance of Language.



10
11
12
13
14
15
# File 'lib/tx-ruby/project_components/language.rb', line 10

def initialize(project_slug = nil, language_code = nil)
  raise MissingParametersError.new(["project_slug"]) if project_slug.nil?
  raise MissingParametersError.new(["language_code"]) if language_code.nil?
  @project_slug = project_slug
  @language_slug = language_code
end

Instance Attribute Details

#language_slugObject

Returns the value of attribute language_slug.



8
9
10
# File 'lib/tx-ruby/project_components/language.rb', line 8

def language_slug
  @language_slug
end

#project_slugObject

Returns the value of attribute project_slug.



8
9
10
# File 'lib/tx-ruby/project_components/language.rb', line 8

def project_slug
  @project_slug
end

Class Method Details

.parentsObject



17
18
19
# File 'lib/tx-ruby/project_components/language.rb', line 17

def self.parents
  [:project]      
end

Instance Method Details

#coordinatorsObject



26
27
28
# File 'lib/tx-ruby/project_components/language.rb', line 26

def coordinators
  Transifex::ProjectComponents::LanguageComponents::Coordinators.new(@project_slug, @language_slug)
end

#fetch_with_detailsObject



21
22
23
24
# File 'lib/tx-ruby/project_components/language.rb', line 21

def fetch_with_details
  options = {:details => true}
  fetch(options)      
end

#reviewersObject



30
31
32
# File 'lib/tx-ruby/project_components/language.rb', line 30

def reviewers
  Transifex::ProjectComponents::LanguageComponents::Reviewers.new(@project_slug, @language_slug)
end

#translatorsObject



34
35
36
# File 'lib/tx-ruby/project_components/language.rb', line 34

def translators
  Transifex::ProjectComponents::LanguageComponents::Translators.new(@project_slug, @language_slug)
end