Class: Everypolitician::Popolo::LegislativePeriod

Inherits:
Event
  • Object
show all
Defined in:
lib/everypolitician/popolo/legislative_period.rb

Instance Attribute Summary

Attributes inherited from Entity

#document, #popolo

Instance Method Summary collapse

Methods inherited from Event

#classification, #end_date, #name, #organization_id, #start_date

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

#membershipsObject


11
12
13
# File 'lib/everypolitician/popolo/legislative_period.rb', line 11

def memberships
  @memberships ||= popolo.memberships.where(legislative_period_id: id, organization_id: organization_id)
end