Class: Zold::Next
- Inherits:
-
Object
- Object
- Zold::Next
- Includes:
- ThreadBadge
- Defined in:
- lib/zold/commands/next.rb
Overview
Calculate next score
Instance Method Summary collapse
-
#initialize(log: Log::NULL) ⇒ Next
constructor
A new instance of Next.
- #run(args = []) ⇒ Object
Constructor Details
Instance Method Details
#run(args = []) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/zold/commands/next.rb', line 41 def run(args = []) @log.debug("Next.run(#{args.join(' ')})") opts = Slop.parse(args, help: true, suppress_errors: true) do |o| o. = "Usage: zold next [options] score Available options:" o.bool '--low-priority', 'Set the lowest priority to this process', default: false o.bool '--help', 'Print instructions' end if opts.help? @log.info(opts.to_s) return end calculate(opts) end |