Class: Transifex::Project
- Inherits:
-
Object
- Object
- Transifex::Project
- Defined in:
- lib/tx-ruby/project.rb
Instance Attribute Summary collapse
-
#project_slug ⇒ Object
Returns the value of attribute project_slug.
-
#resources ⇒ Object
Returns the value of attribute resources.
Instance Method Summary collapse
- #fetch_with_details ⇒ Object
-
#initialize(project_slug = nil) ⇒ Project
constructor
A new instance of Project.
- #language(language_code) ⇒ Object
- #languages ⇒ Object
- #resource(resource_slug) ⇒ Object
Methods included from CrudRequests::Delete
Methods included from CrudRequests::Update
Methods included from CrudRequests::Fetch
Constructor Details
#initialize(project_slug = nil) ⇒ Project
Returns a new instance of Project.
12 13 14 15 |
# File 'lib/tx-ruby/project.rb', line 12 def initialize(project_slug = nil) raise MissingParametersError.new("You must provide a slug for a project") if project_slug.nil? @project_slug = project_slug end |
Instance Attribute Details
#project_slug ⇒ Object
Returns the value of attribute project_slug.
10 11 12 |
# File 'lib/tx-ruby/project.rb', line 10 def project_slug @project_slug end |
#resources ⇒ Object
Returns the value of attribute resources.
10 11 12 |
# File 'lib/tx-ruby/project.rb', line 10 def resources @resources end |
Instance Method Details
#fetch_with_details ⇒ Object
33 34 35 36 |
# File 'lib/tx-ruby/project.rb', line 33 def fetch_with_details = {:details => true} fetch() end |
#language(language_code) ⇒ Object
29 30 31 |
# File 'lib/tx-ruby/project.rb', line 29 def language(language_code) Transifex::ProjectComponents::Language.new(@project_slug, language_code) end |
#languages ⇒ Object
25 26 27 |
# File 'lib/tx-ruby/project.rb', line 25 def languages Transifex::ProjectComponents::Languages.new(@project_slug) end |