Class: Everypolitician::Popolo::Area

Inherits:
Entity
  • Object
show all
Defined in:
lib/everypolitician/popolo/area.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

Constructor Details

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

Instance Method Details

#identifiersObject



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

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

#nameObject



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

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

#other_namesObject



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

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

#typeObject



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

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

#wikidataObject



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

def wikidata
  identifier('wikidata')
end