Sha256: 866b7274a96cbd079ac22aafd791d7e1059f75aef9d267c1cfe9c236cac316a8

Contents?: true

Size: 777 Bytes

Versions: 3

Compression:

Stored size: 777 Bytes

Contents

module Pajamas
  module Commands
    module Tasks
      class Base
        def initialize(argv)
          @filename = "TODO"
          @filename = argv[0] if(argv.length>0)
        end
      end
    
      class List < Base
        def run
          @todoFile = TodoFile.read_file(@filename)
          puts @todoFile.to_console
        end
      end
      
      class Next < Base
        def run
          @todoFile = TodoFile.read_file(@filename)
          puts @todoFile.current_to_console
        end
      end
      
     class Done < Base
        def run
          @todoFile = TodoFile.read_file(@filename)
          current = @todoFile.current
          current.done!
          @todoFile.save
          puts current.to_string
        end
      end
    end
  end  

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gingerhendrix-pajamas-0.1.0 lib/pajamas/commands.rb
gingerhendrix-pajamas-0.1.3 lib/pajamas/commands.rb
gingerhendrix-pajamas-0.1.4 lib/pajamas/commands.rb