Sha256: b6334d9071fa8bbbca4716372025a8d22ae6365b1204a692ec14be21fa69bc42

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

module Capucine
  class Commands

    require 'watch'

    def initialize args
      first_arg = args[0]
      second_arg = args[1]
      cap = Capucine.new

      if first_arg == 'help'
        self.help
      
      elsif first_arg == 'new' or first_arg == 'n'
        Capucine::Tools.new_project second_arg
      
      elsif first_arg == 'init' or first_arg == 'i'
        Capucine::Tools.init second_arg
      
      elsif first_arg == 'compile' or first_arg == 'c'
        Capucine::Tools.compile
      
      elsif first_arg == 'watch' or first_arg == 'w'
        Capucine::Watchr.new second_arg
        
      else
        self.help
      end
    end

    def help
      puts "help"
      exit
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capucine-0.0.2 lib/commands.rb
capucine-0.0.1 lib/commands.rb