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

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

#astroObject

(no documentation provided)



784
785
786
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 784

def astro
  @astro
end

#textObject

(no documentation provided)



782
783
784
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 782

def text
  @text
end

#yearObject

(no documentation provided)



780
781
782
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 780

def year
  @year
end

Class Method Details

.from_json(o) ⇒ Object

constructs a LifespanYear from a (parsed) JSON hash



808
809
810
811
812
813
814
815
816
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 808

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 LifespanYear with a json hash



801
802
803
804
805
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 801

def init_jaxb_json_hash(_o)
  @year = Fixnum.from_json(_o['year']) unless _o['year'].nil?
  @text = String.from_json(_o['text']) unless _o['text'].nil?
  @astro = Fixnum.from_json(_o['astro']) unless _o['astro'].nil?
end

#to_jaxb_json_hashObject

the json hash for this LifespanYear



787
788
789
790
791
792
793
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 787

def to_jaxb_json_hash
  _h = {}
  _h['year'] = year.to_jaxb_json_hash unless year.nil?
  _h['text'] = text.to_jaxb_json_hash unless text.nil?
  _h['astro'] = astro.to_jaxb_json_hash unless astro.nil?
  return _h
end

#to_jsonObject

the json (string form) for this LifespanYear



796
797
798
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 796

def to_json
  to_jaxb_json_hash.to_json
end