everypolitician / everypolitician-popolo

Ruby gem for interacting with EveryPolitician data for a legislature
MIT License
7 stars 4 forks source link

Add Election and LegislativePeriod Events subclasses #109

Closed struan closed 8 years ago

struan commented 8 years ago

This adds Election and LegislativePeriod subclasses to Event. The Event class will now return one of these if the popolo document passed in is an election or legislative period, otherwise it will return a plain Event class.

This also adds elections and terms methods to the Events class and uses them in the Popolo class methods of the same name.

Fixes #67