Class: Cnname::Name
- Inherits:
-
Object
- Object
- Cnname::Name
- Defined in:
- lib/cnname/name.rb
Instance Attribute Summary collapse
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Name
constructor
A new instance of Name.
Constructor Details
#initialize(name) ⇒ Name
Returns a new instance of Name.
5 6 7 |
# File 'lib/cnname/name.rb', line 5 def initialize(name) @first_name, @last_name = parse(name) end |
Instance Attribute Details
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
3 4 5 |
# File 'lib/cnname/name.rb', line 3 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
3 4 5 |
# File 'lib/cnname/name.rb', line 3 def last_name @last_name end |