Class: Transifex::ProjectComponents::Language
- Inherits:
-
Object
- Object
- Transifex::ProjectComponents::Language
- Defined in:
- lib/tx-ruby/project_components/language.rb
Instance Attribute Summary collapse
-
#language_slug ⇒ Object
Returns the value of attribute language_slug.
-
#project_slug ⇒ Object
Returns the value of attribute project_slug.
Class Method Summary collapse
Instance Method Summary collapse
- #coordinators ⇒ Object
- #fetch_with_details ⇒ Object
-
#initialize(project_slug = nil, language_code = nil) ⇒ Language
constructor
A new instance of Language.
- #reviewers ⇒ Object
- #translators ⇒ Object
Methods included from CrudRequests::Delete
Methods included from CrudRequests::Update
Methods included from CrudRequests::Fetch
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_slug ⇒ Object
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_slug ⇒ Object
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
.parents ⇒ Object
17 18 19 |
# File 'lib/tx-ruby/project_components/language.rb', line 17 def self.parents [:project] end |
Instance Method Details
#coordinators ⇒ Object
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_details ⇒ Object
21 22 23 24 |
# File 'lib/tx-ruby/project_components/language.rb', line 21 def fetch_with_details = {:details => true} fetch() end |
#reviewers ⇒ Object
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 |
#translators ⇒ Object
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 |