class Pipl::Phone
Attributes
@!attribute country_code
@return [Fixnum] International country calling code
@!attribute number
@return [Fixnum] Actual phone number
@!attribute extension
@return [String] Office extension
@!attribute type
@return [String] Type of association of this phone to a person. Possible values are: mobile home_phone home_fax work_phone work_fax pager
@!attribute raw
@return [String] Unparsed phone number
@!attribute display
@return [String] Well formatted representation of this phone number for display purposes.
@!attribute display_international
@return [String] Well formatted international representation of this phone number for display purposes.
@!attribute country_code
@return [Fixnum] International country calling code
@!attribute number
@return [Fixnum] Actual phone number
@!attribute extension
@return [String] Office extension
@!attribute type
@return [String] Type of association of this phone to a person. Possible values are: mobile home_phone home_fax work_phone work_fax pager
@!attribute raw
@return [String] Unparsed phone number
@!attribute display
@return [String] Well formatted representation of this phone number for display purposes.
@!attribute display_international
@return [String] Well formatted international representation of this phone number for display purposes.
@!attribute country_code
@return [Fixnum] International country calling code
@!attribute number
@return [Fixnum] Actual phone number
@!attribute extension
@return [String] Office extension
@!attribute type
@return [String] Type of association of this phone to a person. Possible values are: mobile home_phone home_fax work_phone work_fax pager
@!attribute raw
@return [String] Unparsed phone number
@!attribute display
@return [String] Well formatted representation of this phone number for display purposes.
@!attribute display_international
@return [String] Well formatted international representation of this phone number for display purposes.
@!attribute country_code
@return [Fixnum] International country calling code
@!attribute number
@return [Fixnum] Actual phone number
@!attribute extension
@return [String] Office extension
@!attribute type
@return [String] Type of association of this phone to a person. Possible values are: mobile home_phone home_fax work_phone work_fax pager
@!attribute raw
@return [String] Unparsed phone number
@!attribute display
@return [String] Well formatted representation of this phone number for display purposes.
@!attribute display_international
@return [String] Well formatted international representation of this phone number for display purposes.
@!attribute country_code
@return [Fixnum] International country calling code
@!attribute number
@return [Fixnum] Actual phone number
@!attribute extension
@return [String] Office extension
@!attribute type
@return [String] Type of association of this phone to a person. Possible values are: mobile home_phone home_fax work_phone work_fax pager
@!attribute raw
@return [String] Unparsed phone number
@!attribute display
@return [String] Well formatted representation of this phone number for display purposes.
@!attribute display_international
@return [String] Well formatted international representation of this phone number for display purposes.
@!attribute country_code
@return [Fixnum] International country calling code
@!attribute number
@return [Fixnum] Actual phone number
@!attribute extension
@return [String] Office extension
@!attribute type
@return [String] Type of association of this phone to a person. Possible values are: mobile home_phone home_fax work_phone work_fax pager
@!attribute raw
@return [String] Unparsed phone number
@!attribute display
@return [String] Well formatted representation of this phone number for display purposes.
@!attribute display_international
@return [String] Well formatted international representation of this phone number for display purposes.
@!attribute country_code
@return [Fixnum] International country calling code
@!attribute number
@return [Fixnum] Actual phone number
@!attribute extension
@return [String] Office extension
@!attribute type
@return [String] Type of association of this phone to a person. Possible values are: mobile home_phone home_fax work_phone work_fax pager
@!attribute raw
@return [String] Unparsed phone number
@!attribute display
@return [String] Well formatted representation of this phone number for display purposes.
@!attribute display_international
@return [String] Well formatted international representation of this phone number for display purposes.
Public Class Methods
# File lib/pipl/fields.rb, line 238 def self.extra_metadata [:display_international] end
Pipl::Field::new
# File lib/pipl/fields.rb, line 227 def initialize(params={}) super params @country_code = params[:country_code] @number = params[:number] @extension = params[:extension] @type = params[:type] @raw = params[:raw] @display = params[:display] @display_international = params[:display_international] end
Public Instance Methods
# File lib/pipl/fields.rb, line 247 def is_searchable? (@raw and not @raw.empty?) or not @number.nil? end
# File lib/pipl/fields.rb, line 242 def to_hash {country_code: @country_code, number: @number, extension: @extension, raw: @raw} .reject { |_, value| value.nil? } end