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

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

Overview

Citation Field

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#typeObject

(no documentation provided)



271
272
273
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 271

def type
  @type
end

#valueObject

(no documentation provided)



273
274
275
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 273

def value
  @value
end

Class Method Details

.from_json(o) ⇒ Object

constructs a CitationField from a (parsed) JSON hash



295
296
297
298
299
300
301
302
303
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 295

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



289
290
291
292
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 289

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

#to_jaxb_json_hashObject

the json hash for this CitationField



276
277
278
279
280
281
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 276

def to_jaxb_json_hash
  _h = {}
  _h['type'] = type.to_jaxb_json_hash unless type.nil?
  _h['value'] = value.to_jaxb_json_hash unless value.nil?
  return _h
end

#to_jsonObject

the json (string form) for this CitationField



284
285
286
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 284

def to_json
  to_jaxb_json_hash.to_json
end