Class: LibTAD::OnThisDay::Name

Inherits:
Object
  • Object
show all
Defined in:
lib/types/onthisday/name.rb

Overview

A full name.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Name

Returns a new instance of Name.



17
18
19
20
21
# File 'lib/types/onthisday/name.rb', line 17

def initialize(hash)
  @first = hash.fetch('first', nil)
  @middle = hash.fetch('middle', nil)
  @last = hash.fetch('last', nil)
end

Instance Attribute Details

#firstString (readonly)

First name.

Returns:

  • (String)


7
8
9
# File 'lib/types/onthisday/name.rb', line 7

def first
  @first
end

#lastString (readonly)

Last name.

Returns:

  • (String)


15
16
17
# File 'lib/types/onthisday/name.rb', line 15

def last
  @last
end

#middleString (readonly)

Middle name.

Returns:

  • (String)


11
12
13
# File 'lib/types/onthisday/name.rb', line 11

def middle
  @middle
end