Sha256: fb3dbcec588865047512ac4d4bdb74806bc18c7af87db859303daf84b7bf538a

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

require 'language_cards/version'
require 'language_cards/language_cards'
require 'yaml'
require 'i18n'
require 'highline'

##
# TODO:
#  * Implement score-keeper
#  * Race against the clock
#  * Weighted random for better learning
#  * Value to Value is simply keyboard practice and should be clocked

module LanguageCards
  CLEAR = begin
            require 'mkmf'
            MakeMakefile::Logging.instance_variable_set(:@log, File.open(File::NULL, 'w'))
            clear = case RbConfig::CONFIG['target_os']
            when /mingw32|mswin/
              MakeMakefile.find_executable('cls')
            else
              MakeMakefile.find_executable('clear')
            end
            clear ? `#{clear}` : "\e[3J\e[H\e[2J"
          end

  CLI = HighLine.new
  JOIN = " : "

  SUBMENUWIDTH = 60

  ::I18n.load_path = Dir[File.join(File.expand_path(File.join('..','..'), __FILE__), 'locales', '*.yml')]
  ::I18n.load_path += Dir[File.join(File.expand_path(ENV['HOME']), '.language_cards', 'locales', '*.yml')] if ENV['HOME']

  def self.start
    LanguageCards.new.start
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
language_cards-0.0.6 lib/language_cards.rb