lib/language_cards.rb in language_cards-0.0.6 vs lib/language_cards.rb in language_cards-0.0.7
- old
+ new
@@ -10,20 +10,12 @@
# * 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
+ module ESC
+ CLEAR = (ERASE_SCOLLBACK = "\e[3J") + (CURSOR_HOME = "\e[H") + (ERASE_DISPLAY = "\e[2J")
+ end
CLI = HighLine.new
JOIN = " : "
SUBMENUWIDTH = 60