Class: Everypolitician::Popolo::Organization
- Inherits:
-
Entity
- Object
- Entity
- Everypolitician::Popolo::Organization
show all
- Defined in:
- lib/everypolitician/popolo/organization.rb
Instance Attribute Summary
Attributes inherited from Entity
#document, #popolo
Instance Method Summary
collapse
Methods inherited from Entity
#==, #[], classification, #id, #identifier, inherited, #initialize, #key?, subclasses, #wikidata
Instance Method Details
#classification ⇒ Object
9
10
11
|
# File 'lib/everypolitician/popolo/organization.rb', line 9
def classification
document.fetch(:classification, nil)
end
|
#identifiers ⇒ Object
13
14
15
|
# File 'lib/everypolitician/popolo/organization.rb', line 13
def identifiers
document.fetch(:identifiers, [])
end
|
#image ⇒ Object
17
18
19
|
# File 'lib/everypolitician/popolo/organization.rb', line 17
def image
document.fetch(:image, nil)
end
|
#links ⇒ Object
21
22
23
|
# File 'lib/everypolitician/popolo/organization.rb', line 21
def links
document.fetch(:links, [])
end
|
#name ⇒ Object
25
26
27
|
# File 'lib/everypolitician/popolo/organization.rb', line 25
def name
document.fetch(:name, nil)
end
|
#other_names ⇒ Object
29
30
31
|
# File 'lib/everypolitician/popolo/organization.rb', line 29
def other_names
document.fetch(:other_names, [])
end
|
#seats ⇒ Object
TODO: this should be pushed into a Legislature class when we split this into Party and Legislature classes
35
36
37
|
# File 'lib/everypolitician/popolo/organization.rb', line 35
def seats
document.fetch(:seats, nil)
end
|
#srgb ⇒ Object
Also known as:
associated_colour, associated_color
39
40
41
|
# File 'lib/everypolitician/popolo/organization.rb', line 39
def srgb
document.fetch(:srgb, nil)
end
|