Class: RealCharacter

Inherits:
Object
  • Object
show all
Defined in:
lib/randexp/multibyte/characterlists/kanji.rb,
lib/randexp/multibyte/characterlists/hangeul.rb

Class Method Summary collapse

Class Method Details

.hangeulObject



11
12
13
# File 'lib/randexp/multibyte/characterlists/hangeul.rb', line 11

def self.hangeul
  @@hangeul ||= load_hangeul
end

.kanjiObject



11
12
13
# File 'lib/randexp/multibyte/characterlists/kanji.rb', line 11

def self.kanji
  @@kanji ||= load_kanji
end

.load_hangeulObject



2
3
4
5
6
7
8
9
# File 'lib/randexp/multibyte/characterlists/hangeul.rb', line 2

def self.load_hangeul
  characterlist_file = File.expand_path("characterlists/hangeul", ::Randexp::Multibyte::RANDEXP_MULTIBYTE_ROOT)
  if File.exists?(characterlist_file)
    File.read(characterlist_file).split
  else
    raise "words file not found"
  end
end

.load_kanjiObject



2
3
4
5
6
7
8
9
# File 'lib/randexp/multibyte/characterlists/kanji.rb', line 2

def self.load_kanji
  characterlist_file = File.expand_path("characterlists/kanji", ::Randexp::Multibyte::RANDEXP_MULTIBYTE_ROOT)
  if File.exists?(characterlist_file)
    File.read(characterlist_file).split
  else
    raise "words file not found"
  end
end