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



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

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

#identifiersObject



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

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

#imageObject



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

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


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

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

#nameObject



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

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

#other_namesObject



29
30
31
# File 'lib/everypolitician/popolo/organization.rb', line 29

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



35
36
37
# File 'lib/everypolitician/popolo/organization.rb', line 35

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

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