Class: TooDoo::Commands::Clear

Inherits:
Base
  • Object
show all
Defined in:
lib/toodoo/commands/clear.rb

Overview

clear task lists usage: td clear

Instance Attribute Summary

Attributes inherited from Base

#args, #store

Instance Method Summary collapse

Methods inherited from Base

#initialize, #perform!

Constructor Details

This class inherits a constructor from TooDoo::Commands::Base

Instance Method Details

#descriptionObject



8
9
10
11
12
13
# File 'lib/toodoo/commands/clear.rb', line 8

def description
  <<~END
    clear task lists
    usage: td clear
  END
end

#messageObject



15
16
17
# File 'lib/toodoo/commands/clear.rb', line 15

def message
  'lists are empty'
end

#run!Object



19
20
21
22
# File 'lib/toodoo/commands/clear.rb', line 19

def run!
  store.remove_all
  puts message
end