Class: Everypolitician::Popolo::JSON
- Inherits:
-
Object
- Object
- Everypolitician::Popolo::JSON
- Defined in:
- lib/everypolitician/popolo.rb
Instance Attribute Summary collapse
-
#popolo ⇒ Object
readonly
Returns the value of attribute popolo.
Instance Method Summary collapse
- #areas ⇒ Object
- #events ⇒ Object
-
#initialize(popolo) ⇒ JSON
constructor
A new instance of JSON.
- #memberships ⇒ Object
- #organizations ⇒ Object
- #persons ⇒ Object
- #posts ⇒ Object
Constructor Details
#initialize(popolo) ⇒ JSON
Returns a new instance of JSON.
28 29 30 |
# File 'lib/everypolitician/popolo.rb', line 28 def initialize(popolo) @popolo = popolo end |
Instance Attribute Details
#popolo ⇒ Object (readonly)
Returns the value of attribute popolo.
26 27 28 |
# File 'lib/everypolitician/popolo.rb', line 26 def popolo @popolo end |
Instance Method Details
#areas ⇒ Object
40 41 42 |
# File 'lib/everypolitician/popolo.rb', line 40 def areas Areas.new(popolo[:areas]) end |
#events ⇒ Object
44 45 46 |
# File 'lib/everypolitician/popolo.rb', line 44 def events Events.new(popolo[:events]) end |
#memberships ⇒ Object
52 53 54 |
# File 'lib/everypolitician/popolo.rb', line 52 def memberships Memberships.new(popolo[:memberships]) end |
#organizations ⇒ Object
36 37 38 |
# File 'lib/everypolitician/popolo.rb', line 36 def organizations Organizations.new(popolo[:organizations]) end |