lib/task_manager/cli.rb in task_manager2-0.0.5 vs lib/task_manager/cli.rb in task_manager2-0.0.6
- old
+ new
@@ -4,16 +4,16 @@
class Cli < Thor
include Thor::Actions
desc 'add', 'Add a new task to the waiting queue'
method_option :name, aliases: '-n', desc: 'Name of the task', type: :string, required: true
- method_option :score, aliases: '-s', desc: 'Score of the task', type: :integer
+ method_option :score, aliases: '-s', desc: 'Score of the task', type: :numeric
def add
TaskManager.add(options[:name], options[:score])
end
desc 'pick', 'Pick a task from the waiting queue'
- method_option :id, aliases: '-i', desc: 'ID of the task', type: :integer, required: true
+ method_option :id, aliases: '-i', desc: 'ID of the task', type: :numeric, required: true
def pick
TaskManager.pick(options[:id])
end
desc 'current', 'Current task'