class LibTAD::OnThisDay::Person
A historical person.
Attributes
birthdate[R]
@return [::LibTAD::TADTime::TADTime] Date of birth.
categories[R]
@return [Array<String>] Person
categories.
deathdate[R]
@return [::LibTAD::TADTime::TADTime] Date of death, if applicable.
id[R]
@return [Integer] Identifier for the person.
name[R]
@return [::LibTAD::OnThisDay::Name] Full name.
nationalities[R]
@return [Array<String>] The nationalities of the person
Public Class Methods
new(hash)
click to toggle source
# File lib/types/onthisday/person.rb, line 29 def initialize(hash) @id = hash.fetch('id', nil) @name = ::LibTAD::OnThisDay::Name.new hash.fetch('name', nil) @birthdate = ::LibTAD::TADTime::TADTime.new hash['birthdate'] unless !hash.key?('birthdate') @deathdate = ::LibTAD::TADTime::TADTime.new hash['deathdate'] unless !hash.key?('deathdate') @categories = hash.fetch('categories', nil) @nationalities = hash.fetch('nationalities', nil) end