Module: Lexdrill::Inspector
- Defined in:
- lib/lexdrill/inspector.rb
Overview
Builds a human-readable snapshot of lexdrill's current config/state, for
drill inspect — which files are active, how many words, the counter
value, and whether drilling is currently stopped.
Class Method Summary collapse
Class Method Details
.counter_value ⇒ Object
24 25 26 |
# File 'lib/lexdrill/inspector.rb', line 24 def self.counter_value Lexdrill::Counter.new(Lexdrill::WordList::COUNTER_PATH).value end |
.report ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/lexdrill/inspector.rb', line 7 def self.report <<~REPORT drill #{Lexdrill::VERSION} Words file: #{Lexdrill::WordList::PATH} (#{words_summary}) Counter file: #{Lexdrill::WordList::COUNTER_PATH} (value: #{counter_value}) Toggle: #{toggle_summary} LEXDRILL_PATH: #{ENV.fetch('LEXDRILL_PATH', '(not set)')} REPORT end |