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
4
5
6
|
# File 'lib/everypolitician/popolo/organization.rb', line 4
def classification
document.fetch(:classification, nil)
end
|
#identifiers ⇒ Object
8
9
10
|
# File 'lib/everypolitician/popolo/organization.rb', line 8
def identifiers
document.fetch(:identifiers, [])
end
|
#image ⇒ Object
12
13
14
|
# File 'lib/everypolitician/popolo/organization.rb', line 12
def image
document.fetch(:image, nil)
end
|
#links ⇒ Object
16
17
18
|
# File 'lib/everypolitician/popolo/organization.rb', line 16
def links
document.fetch(:links, [])
end
|
#name ⇒ Object
20
21
22
|
# File 'lib/everypolitician/popolo/organization.rb', line 20
def name
document.fetch(:name, nil)
end
|
#other_names ⇒ Object
24
25
26
|
# File 'lib/everypolitician/popolo/organization.rb', line 24
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
30
31
32
|
# File 'lib/everypolitician/popolo/organization.rb', line 30
def seats
document.fetch(:seats, nil)
end
|
#srgb ⇒ Object
Also known as:
associated_colour, associated_color
34
35
36
|
# File 'lib/everypolitician/popolo/organization.rb', line 34
def srgb
document.fetch(:srgb, nil)
end
|