Module: Everypolitician

Defined in:
lib/everypolitician.rb,
lib/everypolitician/version.rb

Defined Under Namespace

Classes: Country, Entity, Error, Legislature

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.country(slug) ⇒ Object


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

def self.country(slug)
  Country.find(slug)
end

.country_legislature(country_slug, legislature_slug) ⇒ Object


16
17
18
19
20
# File 'lib/everypolitician.rb', line 16

def self.country_legislature(country_slug, legislature_slug)
  country = Country.find(country_slug)
  legislature = country.legislature(legislature_slug)
  [country, legislature]
end

.legislature(country_slug, legislature_slug) ⇒ Object


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

def self.legislature(country_slug, legislature_slug)
  Legislature.find(country_slug, legislature_slug)
end