Module: AnyStyle::Data

Defined in:
lib/anystyle/data/setup.rb,
lib/anystyle/data/version.rb

Constant Summary collapse

ROOT =
File.expand_path('..', __FILE__).untaint
VERSION =
'1.0.0'.freeze

Class Method Summary collapse

Class Method Details

.setupObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/anystyle/data/setup.rb', line 5

def self.setup
  Dictionary.defaults[:source] = File.join(ROOT, 'dict.txt.gz')

  if defined? Dictionary::GDBM
    Dictionary::GDBM.defaults[:path] = File.join(ROOT, 'dict.db')
  end

  if defined? Dictionary::LDBM
    Dictionary::LDBM.defaults[:path] = ROOT
  end
end