Module: FFaker::CompanyCN

Extended by:
CompanyCN, ModuleUtils
Included in:
CompanyCN
Defined in:
lib/ffaker/company_cn.rb

Constant Summary collapse

TYPES =
%w[科技 食品 电器 教育 咨询 网络].freeze
SUFFIXES =
%w[有限公司 公司].freeze

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#nameObject


11
12
13
# File 'lib/ffaker/company_cn.rb', line 11

def name
  "#{NameCN.first_name}#{type}#{suffix}"
end

#suffixObject


19
20
21
# File 'lib/ffaker/company_cn.rb', line 19

def suffix
  fetch_sample(SUFFIXES)
end

#typeObject


15
16
17
# File 'lib/ffaker/company_cn.rb', line 15

def type
  fetch_sample(TYPES)
end