Class: Org::Familysearch::Ws::Familytree::V2::Schema::OrdinanceAssertion
- 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
-
#official ⇒ Object
Whether this is an official assertion.
-
#value ⇒ Object
The value for this assertion.
Attributes inherited from Assertion
#action, #citations, #contributors, #disposition, #id, #modifiable, #modified, #notes, #personas, #selected, #tempId, #version
Class Method Summary collapse
-
.from_json(o) ⇒ Object
constructs a OrdinanceAssertion from a (parsed) JSON hash.
Instance Method Summary collapse
- #add_value(options) ⇒ Object
-
#init_jaxb_json_hash(_o) ⇒ Object
initializes this OrdinanceAssertion with a json hash.
-
#to_jaxb_json_hash ⇒ Object
the json hash for this OrdinanceAssertion.
Methods inherited from Assertion
Instance Attribute Details
#official ⇒ Object
Whether this is an official assertion.
5643 5644 5645 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 5643 def official @official end |
#value ⇒ Object
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
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() raise ArgumentError, "missing option[:type]" if [:type].nil? raise ArgumentError, "missing option[:place]" if [:place].nil? self.value = OrdinanceValue.new self.value.type = [:type] self.value.add_date([:date]) if [:date] self.value.add_place([:place]) if [:place] self.value.temple = [:temple] if [:temple] if [:type] == OrdinanceType::Sealing_to_Parents self.value.add_mother([:mother]) self.value.add_father([: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_hash ⇒ Object
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 |