Class: Pipl::Gender

Inherits:
Field
  • Object
show all
Defined in:
lib/pipl/fields.rb

Instance Attribute Summary collapse

Attributes inherited from Field

#current, #inferred, #last_seen, #valid_since

Instance Method Summary collapse

Methods inherited from Field

base_params_from_hash, extra_metadata, from_hash, #is_searchable?

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 = {}) ⇒ Gender

Returns a new instance of Gender.



577
578
579
580
# File 'lib/pipl/fields.rb', line 577

def initialize(params={})
  super params
  @content = params[:content]
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



575
576
577
# File 'lib/pipl/fields.rb', line 575

def content
  @content
end

Instance Method Details

#to_hashObject



586
587
588
# File 'lib/pipl/fields.rb', line 586

def to_hash
  {content: @content} if @content
end

#to_sObject



582
583
584
# File 'lib/pipl/fields.rb', line 582

def to_s
  Pipl::Utils.titleize @content if @content
end