class RabbitHole::CLI
Public Instance Methods
add(task)
click to toggle source
# File lib/rabbit_hole/cli.rb, line 6 def add(task) stack = Base.new stack.push task puts "Added task '#{task}' to the stack!" end
complete()
click to toggle source
# File lib/rabbit_hole/cli.rb, line 19 def complete stack = Base.new puts "Completed: '#{stack.pop}'" puts "Next task: '#{stack.top}'" end
current()
click to toggle source
# File lib/rabbit_hole/cli.rb, line 13 def current stack = Base.new puts "Currently working on: '#{stack.top}'" end
show()
click to toggle source
# File lib/rabbit_hole/cli.rb, line 26 def show stack = Base.new tasks = stack.tasks puts "#{tasks.size} levels deep" puts "Current task: #{tasks.last}" tasks[0...-1].each do |task| puts task end end