Class: DarujmeCz::Project
- Inherits:
-
Base
- Object
- Base
- DarujmeCz::Project
show all
- Defined in:
- lib/darujme_cz/project.rb
Overview
Instance Attribute Summary
Attributes inherited from Base
#id
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
all, base_path, connection, define_attributes, where
Constructor Details
#initialize(attributes) ⇒ Project
Returns a new instance of Project.
14
15
16
17
|
# File 'lib/darujme_cz/project.rb', line 14
def initialize(attributes)
@id = attributes["projectId"]
super
end
|
Class Method Details
.endpoint ⇒ Object
4
5
6
|
# File 'lib/darujme_cz/project.rb', line 4
def self.endpoint
"project"
end
|
.find(id) ⇒ Object
8
9
10
11
|
# File 'lib/darujme_cz/project.rb', line 8
def self.find(id)
data = connection.get "project/#{id}"
new data[endpoint]
end
|
Instance Method Details
#content(lang = "cs") ⇒ Object
27
28
29
|
# File 'lib/darujme_cz/project.rb', line 27
def content(lang = "cs")
get_localized_attribute "content", lang
end
|
#name(lang = "cs") ⇒ Object
19
20
21
|
# File 'lib/darujme_cz/project.rb', line 19
def name(lang = "cs")
get_localized_attribute "title", lang
end
|
#organization ⇒ Object
23
24
25
|
# File 'lib/darujme_cz/project.rb', line 23
def organization
end
|
#synopsis(lang = "cs") ⇒ Object
31
32
33
|
# File 'lib/darujme_cz/project.rb', line 31
def synopsis(lang = "cs")
get_localized_attribute "synopsis", lang
end
|