Class: Everypolitician::Popolo::Post
- Inherits:
-
Entity
- Object
- Entity
- Everypolitician::Popolo::Post
show all
- Defined in:
- lib/everypolitician/popolo/post.rb
Instance Attribute Summary
Attributes inherited from Entity
#document, #popolo
Instance Method Summary
collapse
Methods inherited from Entity
#==, #[], classification, #id, #identifier, #identifiers, inherited, #initialize, #key?, subclasses, #wikidata
Instance Method Details
#label ⇒ Object
9
10
11
|
# File 'lib/everypolitician/popolo/post.rb', line 9
def label
document.fetch(:label, nil)
end
|
#organization ⇒ Object
17
18
19
|
# File 'lib/everypolitician/popolo/post.rb', line 17
def organization
popolo.organizations.find_by(id: organization_id)
end
|
#organization_id ⇒ Object
13
14
15
|
# File 'lib/everypolitician/popolo/post.rb', line 13
def organization_id
document.fetch(:organization_id, nil)
end
|