Class: Everypolitician::Popolo::Event

Inherits:
Entity
  • Object
show all
Defined in:
lib/everypolitician/popolo/event.rb

Direct Known Subclasses

Election, LegislativePeriod

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

Constructor Details

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

Instance Method Details

#classificationObject



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

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

#end_dateObject



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

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

#nameObject



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

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

#organization_idObject



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

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

#start_dateObject



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

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