Class: Pipl::API::Response
- Inherits:
-
Object
- Object
- Pipl::API::Response
- Defined in:
- lib/pipl/api/response.rb,
lib/pipl/api/response/age.rb,
lib/pipl/api/response/name.rb,
lib/pipl/api/response/gender.rb,
lib/pipl/api/response/person.rb,
lib/pipl/api/response/location.rb
Defined Under Namespace
Classes: Age, Gender, Location, Name, Person
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#person ⇒ Object
readonly
Returns the value of attribute person.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(raw) ⇒ Response
constructor
A new instance of Response.
- #ok? ⇒ Boolean
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
10 11 12 |
# File 'lib/pipl/api/response.rb', line 10 def data @data end |
#person ⇒ Object (readonly)
Returns the value of attribute person.
13 14 15 |
# File 'lib/pipl/api/response.rb', line 13 def person @person end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/pipl/api/response.rb', line 11 def status @status end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
12 13 14 |
# File 'lib/pipl/api/response.rb', line 12 def warnings @warnings end |
Instance Method Details
#ok? ⇒ Boolean
22 23 24 |
# File 'lib/pipl/api/response.rb', line 22 def ok? status == 200 end |