Class: Unit::Types::FullName
- Inherits:
-
Object
- Object
- Unit::Types::FullName
- Defined in:
- lib/unit/types/full_name.rb
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
Instance Method Summary collapse
-
#initialize(first, last) ⇒ FullName
constructor
A new instance of FullName.
- #represent ⇒ Object
Constructor Details
#initialize(first, last) ⇒ FullName
Returns a new instance of FullName.
10 11 12 13 |
# File 'lib/unit/types/full_name.rb', line 10 def initialize(first, last) @first = first @last = last end |
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first.
6 7 8 |
# File 'lib/unit/types/full_name.rb', line 6 def first @first end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
6 7 8 |
# File 'lib/unit/types/full_name.rb', line 6 def last @last end |
Instance Method Details
#represent ⇒ Object
15 16 17 18 19 20 |
# File 'lib/unit/types/full_name.rb', line 15 def represent { first: first, last: last } end |