class TooDoo::Commands::Base

Base class represents template for command entity it provides common logic for all commands

Attributes

args[R]
store[R]

Public Class Methods

new(args, store = Store) click to toggle source
# File lib/toodoo/commands/base.rb, line 10
def initialize(args, store = Store)
  @args = args
  @store = store.new
end

Public Instance Methods

description() click to toggle source
# File lib/toodoo/commands/base.rb, line 15
def description
  ''
end
perform!() click to toggle source
# File lib/toodoo/commands/base.rb, line 24
def perform!
  raise NotImplementedError
end
run!() click to toggle source
# File lib/toodoo/commands/base.rb, line 19
def run!
  return puts description if args.empty?
  perform!
end