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

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#birthObject

(no documentation provided)



717
718
719
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 717

def birth
  @birth
end

#deathObject

(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_hashObject

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_jsonObject

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