Class: NationBuilder::People
- Inherits:
-
Object
- Object
- NationBuilder::People
- Defined in:
- lib/nation_builder/people.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ People
constructor
A new instance of People.
- #list ⇒ Object
Constructor Details
#initialize(client) ⇒ People
Returns a new instance of People.
5 6 7 |
# File 'lib/nation_builder/people.rb', line 5 def initialize(client) self.client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/nation_builder/people.rb', line 3 def client @client end |
Instance Method Details
#list ⇒ Object
9 10 11 |
# File 'lib/nation_builder/people.rb', line 9 def list() JSON.parse(client.get('/api/v1/people').response.env[:body]) end |