Sha256: b2c2b230168c15471753dbd3139fc69e97faaeac654e8abfb64f7502a1c48f37

Contents?: true

Size: 600 Bytes

Versions: 1

Compression:

Stored size: 600 Bytes

Contents

$:.unshift(File.dirname(__FILE__)) unless
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))

require 'rubygems'
require 'activesupport'

$KCODE = 'u'

require 'random_text/random_text'
require 'random_text/random_strings'

module RandomText
  VERSION = '0.0.3'

  def self.add_dictionary(path)
    const_name = File.basename(path, File.extname(path)).classify
    self.const_set(const_name, RandomText.new(File.read(path)))
  end
end

Dir.glob(File.join(File.dirname(__FILE__), '..', 'resources', '*.txt')) do |path|
  RandomText.add_dictionary(path)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
random_text-0.0.3 lib/random_text.rb