Class: ChineseName

Inherits:
Object
  • Object
show all
Defined in:
lib/chinese_name.rb,
lib/chinese_name/version.rb

Constant Summary collapse

LAST_NAME_DATA =
'last_name.dat'.freeze
VERSION =
"0.1.2"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeChineseName

Returns a new instance of ChineseName.



15
16
17
18
# File 'lib/chinese_name.rb', line 15

def initialize
  full_name
  self
end

Instance Attribute Details

#first_nameObject (readonly)

Returns the value of attribute first_name.



6
7
8
# File 'lib/chinese_name.rb', line 6

def first_name
  @first_name
end

#full_nameObject (readonly) Also known as: to_s

Returns the value of attribute full_name.



6
7
8
# File 'lib/chinese_name.rb', line 6

def full_name
  @full_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



6
7
8
# File 'lib/chinese_name.rb', line 6

def last_name
  @last_name
end

Class Method Details

.generateObject Also known as: g



9
10
11
# File 'lib/chinese_name.rb', line 9

def generate
  new
end