Class: Everypolitician::Popolo::Organization

Inherits:
Entity
  • Object
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

Constructor Details

This class inherits a constructor from Everypolitician::Popolo::Entity

Instance Method Details

#classificationObject



4
5
6
# File 'lib/everypolitician/popolo/organization.rb', line 4

def classification
  document.fetch(:classification, nil)
end

#identifiersObject



8
9
10
# File 'lib/everypolitician/popolo/organization.rb', line 8

def identifiers
  document.fetch(:identifiers, [])
end

#imageObject



12
13
14
# File 'lib/everypolitician/popolo/organization.rb', line 12

def image
  document.fetch(:image, nil)
end


16
17
18
# File 'lib/everypolitician/popolo/organization.rb', line 16

def links
  document.fetch(:links, [])
end

#nameObject



20
21
22
# File 'lib/everypolitician/popolo/organization.rb', line 20

def name
  document.fetch(:name, nil)
end

#other_namesObject



24
25
26
# File 'lib/everypolitician/popolo/organization.rb', line 24

def other_names
  document.fetch(:other_names, [])
end

#seatsObject

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

#srgbObject 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