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

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

Overview

An astro date.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#earliestObject

The earliest astro date.



3593
3594
3595
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3593

def earliest
  @earliest
end

#latestObject

The lastest astro date.



3595
3596
3597
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3595

def latest
  @latest
end

Class Method Details

.from_json(o) ⇒ Object

constructs a DateAstro from a (parsed) JSON hash



3617
3618
3619
3620
3621
3622
3623
3624
3625
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3617

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



3611
3612
3613
3614
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3611

def init_jaxb_json_hash(_o)
  @earliest = String.from_json(_o['earliest']) unless _o['earliest'].nil?
  @latest = String.from_json(_o['latest']) unless _o['latest'].nil?
end

#to_jaxb_json_hashObject

the json hash for this DateAstro



3598
3599
3600
3601
3602
3603
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3598

def to_jaxb_json_hash
  _h = {}
  _h['earliest'] = earliest.to_jaxb_json_hash unless earliest.nil?
  _h['latest'] = latest.to_jaxb_json_hash unless latest.nil?
  return _h
end

#to_jsonObject

the json (string form) for this DateAstro



3606
3607
3608
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 3606

def to_json
  to_jaxb_json_hash.to_json
end