Class: WhosGotDirt::Responses::Helpers::OpenCorporatesHelper
- Inherits:
-
WhosGotDirt::Response
- Object
- SimpleDelegator
- WhosGotDirt::Response
- WhosGotDirt::Responses::Helpers::OpenCorporatesHelper
- Defined in:
- lib/whos_got_dirt/responses/helpers/open_corporates.rb
Direct Known Subclasses
Entity::OpenCorporates, List::OpenCorporates, Relation::OpenCorporates
Instance Method Summary collapse
-
#count ⇒ Fixnum
Returns the total number of matching results.
-
#page ⇒ Fixnum
Returns the current page number.
-
#parse_body ⇒ Array<Hash>
Parses the response body.
Constructor Details
This class inherits a constructor from WhosGotDirt::Response
Instance Method Details
#count ⇒ Fixnum
Returns the total number of matching results.
15 16 17 |
# File 'lib/whos_got_dirt/responses/helpers/open_corporates.rb', line 15 def count parsed_body['total_count'] end |
#page ⇒ Fixnum
Returns the current page number.
22 23 24 |
# File 'lib/whos_got_dirt/responses/helpers/open_corporates.rb', line 22 def page parsed_body['page'] end |
#parse_body ⇒ Array<Hash>
Parses the response body.
8 9 10 |
# File 'lib/whos_got_dirt/responses/helpers/open_corporates.rb', line 8 def parse_body JSON.load(body)['results'] end |