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



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

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

#end_dateObject



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

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

#nameObject



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

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

#organization_idObject



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

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

#start_dateObject



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

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