Class: OpenCongressApi::Fetcher::People
- Defined in:
- lib/opencongress_api/fetcher/people.rb
Instance Method Summary collapse
- #format_result(result) ⇒ Object
-
#initialize ⇒ People
constructor
A new instance of People.
- #json_result(json) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ People
Returns a new instance of People.
4 5 6 |
# File 'lib/opencongress_api/fetcher/people.rb', line 4 def initialize @type = :people end |
Instance Method Details
#format_result(result) ⇒ Object
8 9 10 |
# File 'lib/opencongress_api/fetcher/people.rb', line 8 def format_result(result) OpenCongressApi::Type::Person.new(result) end |
#json_result(json) ⇒ Object
12 13 14 |
# File 'lib/opencongress_api/fetcher/people.rb', line 12 def json_result(json) json['people'] end |