Module: FFakerTW::CompanyTW

Extended by:
CompanyTW, ModuleUtils
Included in:
CompanyTW
Defined in:
lib/ffakerTW/company_tw.rb

Constant Summary collapse

TYPES =
%w[資訊 食品 教育 顧問 網路 企業 實業 機械 電腦 科技 金控 工業 半導體 人壽 光電 精密 電子 建設 能源 ].freeze
SUFFIXES =
%w[股份有限公司 有限公司 公司].freeze

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#nameObject



11
12
13
# File 'lib/ffakerTW/company_tw.rb', line 11

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

#suffixObject



19
20
21
# File 'lib/ffakerTW/company_tw.rb', line 19

def suffix
  fetch_sample(SUFFIXES)
end

#typeObject



15
16
17
# File 'lib/ffakerTW/company_tw.rb', line 15

def type
  fetch_sample(TYPES)
end