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

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

Overview

A gender 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.



7050
7051
7052
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7050

def value
  @value
end

Class Method Details

.from_json(o) ⇒ Object

constructs a GenderAssertion from a (parsed) JSON hash



7066
7067
7068
7069
7070
7071
7072
7073
7074
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7066

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(value) ⇒ Object



4
5
6
7
# File 'lib/ruby-fs-stack/familytree/gender.rb', line 4

def add_value(value)
  self.value = GenderValue.new
  self.value.type = value
end

#init_jaxb_json_hash(_o) ⇒ Object

initializes this GenderAssertion with a json hash



7060
7061
7062
7063
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7060

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

#to_jaxb_json_hashObject

the json hash for this GenderAssertion



7053
7054
7055
7056
7057
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7053

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