Class: Pipl::API::Response::Gender
- Inherits:
-
Object
- Object
- Pipl::API::Response::Gender
- Defined in:
- lib/pipl/api/response/gender.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#estimation ⇒ Object
readonly
Returns the value of attribute estimation.
Instance Method Summary collapse
-
#initialize(gender) ⇒ Gender
constructor
A new instance of Gender.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(gender) ⇒ Gender
Returns a new instance of Gender.
8 9 10 11 |
# File 'lib/pipl/api/response/gender.rb', line 8 def initialize(gender) @code = gender.first @estimation = gender.last end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/pipl/api/response/gender.rb', line 5 def code @code end |
#estimation ⇒ Object (readonly)
Returns the value of attribute estimation.
6 7 8 |
# File 'lib/pipl/api/response/gender.rb', line 6 def estimation @estimation end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
13 14 15 16 17 18 |
# File 'lib/pipl/api/response/gender.rb', line 13 def to_hash { code: code, estimation: estimation } end |