Module: Lexdrill::Toggle
- Defined in:
- lib/lexdrill/toggle.rb
Overview
Global pause/resume switch for the shell hook. Enabled by default; the marker file's presence means stopped.
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.enabled? ⇒ Boolean
10 11 12 |
# File 'lib/lexdrill/toggle.rb', line 10 def self.enabled? !File.exist?(PATH) end |
.start ⇒ Object
14 15 16 |
# File 'lib/lexdrill/toggle.rb', line 14 def self.start FileUtils.rm_f(PATH) end |
.stop ⇒ Object
18 19 20 |
# File 'lib/lexdrill/toggle.rb', line 18 def self.stop File.write(PATH, "") end |