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

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

Overview

An ordinance 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

#officialObject

Whether this is an official assertion.



5643
5644
5645
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 5643

def official
  @official
end

#valueObject

The value for this assertion.



5645
5646
5647
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 5645

def value
  @value
end

Class Method Details

.from_json(o) ⇒ Object

constructs a OrdinanceAssertion from a (parsed) JSON hash



5663
5664
5665
5666
5667
5668
5669
5670
5671
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 5663

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

Raises:

  • (ArgumentError)


56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/ruby-fs-stack/familytree/ordinance.rb', line 56

def add_value(options)
  raise ArgumentError, "missing option[:type]" if options[:type].nil?
  raise ArgumentError, "missing option[:place]" if options[:place].nil?
  self.value = OrdinanceValue.new
  self.value.type = options[:type]
  self.value.add_date(options[:date]) if options[:date]
  self.value.add_place(options[:place]) if options[:place]
  self.value.temple = options[:temple] if options[:temple]
  if options[:type] == OrdinanceType::Sealing_to_Parents
    self.value.add_mother(options[:mother])
    self.value.add_father(options[:father])
  end
end

#init_jaxb_json_hash(_o) ⇒ Object

initializes this OrdinanceAssertion with a json hash



5656
5657
5658
5659
5660
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 5656

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

#to_jaxb_json_hashObject

the json hash for this OrdinanceAssertion



5648
5649
5650
5651
5652
5653
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 5648

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