Class: Zold::Next
- Inherits:
-
Object
- Object
- Zold::Next
- Defined in:
- lib/zold/commands/next.rb
Overview
Calculate next score
Instance Method Summary collapse
-
#initialize(log: Log::Quiet.new) ⇒ Next
constructor
A new instance of Next.
- #run(args = []) ⇒ Object
Constructor Details
Instance Method Details
#run(args = []) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/zold/commands/next.rb', line 38 def run(args = []) opts = Slop.parse(args, help: true, suppress_errors: true) do |o| o. = "Usage: zold next [options] score Available options:" o.bool '--help', 'Print instructions' end if opts.help? @log.info(opts.to_s) return end calculate(opts) end |