Class: Pipl::Url

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

Instance Attribute Summary collapse

Attributes inherited from Field

#inferred, #valid_since

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Field

base_params_from_hash, from_hash, #is_searchable?, #to_hash

Methods included from Utils

alnum_chars, alpha_chars, date_to_str, is_valid_url?, str_to_date, titleize, to_utf8

Constructor Details

#initialize(params = {}) ⇒ Url

Returns a new instance of Url.



538
539
540
541
542
543
544
545
546
# File 'lib/pipl/fields.rb', line 538

def initialize(params={})
  super params
  @url = params[:url]
  @category = params[:category]
  @domain = params[:domain]
  @name = params[:name]
  @sponsored = params[:sponsored]
  @source_id = params[:source_id]
end

Instance Attribute Details

#categoryString

Possible values are:

background_reports
contact_details
email_address
media
personal_profiles
professional_and_business
public_records
publications
school_and_classmates
web_pages

Returns:

  • (String)

    Category of the domain



536
# File 'lib/pipl/fields.rb', line 536

attr_accessor :url, :category, :domain, :name, :sponsored, :source_id

#domainString

Returns Canonical domain of the url.

Returns:

  • (String)

    Canonical domain of the url



536
# File 'lib/pipl/fields.rb', line 536

attr_accessor :url, :category, :domain, :name, :sponsored, :source_id

#nameString

Returns Name of the website hosting the url.

Returns:

  • (String)

    Name of the website hosting the url



536
# File 'lib/pipl/fields.rb', line 536

attr_accessor :url, :category, :domain, :name, :sponsored, :source_id

#source_idObject

Returns the value of attribute source_id.



536
537
538
# File 'lib/pipl/fields.rb', line 536

def source_id
  @source_id
end

Returns Unique identifier of this url.

Returns:

  • (String)

    Unique identifier of this url



536
# File 'lib/pipl/fields.rb', line 536

attr_accessor :url, :category, :domain, :name, :sponsored, :source_id

#urlString

Returns Actual Url.

Returns:

  • (String)

    Actual Url



536
537
538
# File 'lib/pipl/fields.rb', line 536

def url
  @url
end

Class Method Details

.extra_metadataObject



548
549
550
# File 'lib/pipl/fields.rb', line 548

def self.
  [:category, :domain, :name, :sponsored, :source_id]
end