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.



572
573
574
575
# File 'lib/pipl/fields.rb', line 572

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

Instance Attribute Details

#contentObject

Returns the value of attribute content.



570
571
572
# File 'lib/pipl/fields.rb', line 570

def content
  @content
end

Instance Method Details

#to_hashObject



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

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

#to_sObject



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

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