Sha256: 2eb618c696dfe59045317804a0069369d8240bd2c343adf9967cd75f5eccc977
Contents?: true
Size: 871 Bytes
Versions: 2
Compression:
Stored size: 871 Bytes
Contents
require 'language_cards/version' require 'language_cards/language_cards' require 'yaml' require 'i18n' require 'slop' require 'highline' ## # TODO: # * Implement score-keeper # * Race against the clock # * Weighted random for better learning module LanguageCards OPTS = Slop.parse do |args| args.string '-l', '--language', 'language (default: en)', default: 'en' end CARD_LANGUAGE = OPTS[:language] module ESC CLEAR = (ERASE_SCOLLBACK = "\e[3J") + (CURSOR_HOME = "\e[H") + (ERASE_DISPLAY = "\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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
language_cards-0.3.2 | lib/language_cards.rb |
language_cards-0.3.1 | lib/language_cards.rb |