class Pipl::Relationship

Constants

CLASS_CONTAINER

Attributes

inferred[RW]

@!attribute valid_since

@see Field

@!attribute inferred

@see Field

@!attribute type

@return [String] Type of association of this relationship to a person.
Possible values are:
  friend
  family
  work
  other

@!attribute subtype

@return [String] Subtype of association of this relationship to a person. Free text.
subtype[RW]

@!attribute valid_since

@see Field

@!attribute inferred

@see Field

@!attribute type

@return [String] Type of association of this relationship to a person.
Possible values are:
  friend
  family
  work
  other

@!attribute subtype

@return [String] Subtype of association of this relationship to a person. Free text.
type[RW]

@!attribute valid_since

@see Field

@!attribute inferred

@see Field

@!attribute type

@return [String] Type of association of this relationship to a person.
Possible values are:
  friend
  family
  work
  other

@!attribute subtype

@return [String] Subtype of association of this relationship to a person. Free text.
valid_since[RW]

@!attribute valid_since

@see Field

@!attribute inferred

@see Field

@!attribute type

@return [String] Type of association of this relationship to a person.
Possible values are:
  friend
  family
  work
  other

@!attribute subtype

@return [String] Subtype of association of this relationship to a person. Free text.

Public Class Methods

from_hash(h) click to toggle source
# File lib/pipl/containers.rb, line 192
def self.from_hash(h)
  params = Pipl::Field.base_params_from_hash h
  params[:subtype] = h[:@subtype]
  params[:fields] = self.fields_from_hash(h)
  self.new(params)
end
new(params={}) click to toggle source
Calls superclass method Pipl::FieldsContainer::new
# File lib/pipl/containers.rb, line 184
def initialize(params={})
  super params
  @valid_since = params[:valid_since]
  @inferred = params[:inferred]
  @type = params[:type]
  @subtype = params[:subtype]
end

Public Instance Methods

to_hash() click to toggle source
# File lib/pipl/containers.rb, line 199
def to_hash
  fields_to_hash
end
to_s() click to toggle source
# File lib/pipl/containers.rb, line 203
def to_s
  @names.first.to_s unless @names.empty?
end