Class: Org::Familysearch::Ws::Familytree::V2::Schema::CharacteristicAssertion

Inherits:
Assertion
  • Object
show all
Defined in:
lib/ruby-fs-stack/enunciate/familytree.rb,
lib/ruby-fs-stack/familytree/characteristic.rb

Overview

A characteristic of a person.

Instance Attribute Summary collapse

Attributes inherited from Assertion

#action, #citations, #contributors, #disposition, #id, #modifiable, #modified, #notes, #personas, #selected, #tempId, #version

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Assertion

#to_json

Instance Attribute Details

#valueObject

The value for this assertion.



7713
7714
7715
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7713

def value
  @value
end

Class Method Details

.from_json(o) ⇒ Object

constructs a CharacteristicAssertion from a (parsed) JSON hash



7729
7730
7731
7732
7733
7734
7735
7736
7737
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7729

def self.from_json(o)
  if o.nil?
    return nil
  else
    inst = new
    inst.init_jaxb_json_hash o
    return inst
  end
end

Instance Method Details

#add_value(options) ⇒ Object

Params

  • options - same as RelationshipAssertions#add_characteristic



6
7
8
9
10
# File 'lib/ruby-fs-stack/familytree/characteristic.rb', line 6

def add_value(options)
  self.value = CharacteristicValue.new
  self.value.type = options[:type]
  self.value.lineage = options[:lineage] if options[:lineage]
end

#init_jaxb_json_hash(_o) ⇒ Object

initializes this CharacteristicAssertion with a json hash



7723
7724
7725
7726
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7723

def init_jaxb_json_hash(_o)
  super _o
  @value = Org::Familysearch::Ws::Familytree::V2::Schema::CharacteristicValue.from_json(_o['value']) unless _o['value'].nil?
end

#to_jaxb_json_hashObject

the json hash for this CharacteristicAssertion



7716
7717
7718
7719
7720
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7716

def to_jaxb_json_hash
  _h = super
  _h['value'] = value.to_jaxb_json_hash unless value.nil?
  return _h
end