Class: Cnname::Name

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_nameObject (readonly)

Returns the value of attribute last_name.



3
4
5
# File 'lib/cnname/name.rb', line 3

def last_name
  @last_name
end