Class: Org::Familysearch::Ws::Familytree::V2::Schema::Lifespan
- Defined in:
- lib/ruby-fs-stack/enunciate/familytree.rb
Instance Attribute Summary collapse
-
#birth ⇒ Object
(no documentation provided).
-
#death ⇒ Object
(no documentation provided).
Class Method Summary collapse
-
.from_json(o) ⇒ Object
constructs a Lifespan from a (parsed) JSON hash.
Instance Method Summary collapse
-
#init_jaxb_json_hash(_o) ⇒ Object
initializes this Lifespan with a json hash.
-
#to_jaxb_json_hash ⇒ Object
the json hash for this Lifespan.
-
#to_json ⇒ Object
the json (string form) for this Lifespan.
Instance Attribute Details
#birth ⇒ Object
(no documentation provided)
717 718 719 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 717 def birth @birth end |
#death ⇒ Object
(no documentation provided)
719 720 721 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 719 def death @death end |
Class Method Details
.from_json(o) ⇒ Object
constructs a Lifespan from a (parsed) JSON hash
741 742 743 744 745 746 747 748 749 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 741 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
#init_jaxb_json_hash(_o) ⇒ Object
initializes this Lifespan with a json hash
735 736 737 738 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 735 def init_jaxb_json_hash(_o) @birth = Org::Familysearch::Ws::Familytree::V2::Schema::LifespanYear.from_json(_o['birth']) unless _o['birth'].nil? @death = Org::Familysearch::Ws::Familytree::V2::Schema::LifespanYear.from_json(_o['death']) unless _o['death'].nil? end |
#to_jaxb_json_hash ⇒ Object
the json hash for this Lifespan
722 723 724 725 726 727 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 722 def to_jaxb_json_hash _h = {} _h['birth'] = birth.to_jaxb_json_hash unless birth.nil? _h['death'] = death.to_jaxb_json_hash unless death.nil? return _h end |
#to_json ⇒ Object
the json (string form) for this Lifespan
730 731 732 |
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 730 def to_json to_jaxb_json_hash.to_json end |