Class: Pipl::Ethnicity
Instance Attribute Summary collapse
-
#content ⇒ String
Possible values are: white black american_indian alaska_native asian_indian chinese filipino other_asian japanese korean vietnamese native_hawaiian guamanian chamorro samoan other_pacific_islander other.
Attributes inherited from Field
#current, #inferred, #last_seen, #valid_since
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Ethnicity
constructor
A new instance of Ethnicity.
- #to_s ⇒ Object
Methods inherited from Field
base_params_from_hash, extra_metadata, from_hash, #is_searchable?, #to_hash
Methods included from Utils
alnum_chars, alpha_chars, date_to_str, extract_rate_limits, is_valid_url?, str_to_date, titleize, to_utf8
Constructor Details
#initialize(params = {}) ⇒ Ethnicity
Returns a new instance of Ethnicity.
613 614 615 616 |
# File 'lib/pipl/fields.rb', line 613 def initialize(params={}) super params @content = params[:content] end |
Instance Attribute Details
#content ⇒ String
Possible values are:
white
black
american_indian
alaska_native
asian_indian
chinese
filipino
other_asian
japanese
korean
vietnamese
native_hawaiian
guamanian
chamorro
samoan
other_pacific_islander
other
611 612 613 |
# File 'lib/pipl/fields.rb', line 611 def content @content end |
Instance Method Details
#to_s ⇒ Object
618 619 620 |
# File 'lib/pipl/fields.rb', line 618 def to_s Pipl::Utils.titleize @content.gsub(/_/, ' ') if @content end |