Sha256: 66bd7e1f2babd95e8f8f8dcfaad36ec2eae5e6939138642583b154cfec38997b

Contents?: true

Size: 740 Bytes

Versions: 2

Compression:

Stored size: 740 Bytes

Contents

module Bonethug
  class CLI

    def self.handle

      # what are we doing?
      task = ARGV[0] || 'help'

      case task

      when 'help'

        display_help

      when 'install'

        # handle args
        type = ARGV[1]
        location = ARGV[2] || '.'
        puts 'Usage: bonethug install [location]' if type.empty?
        
        # run the installer
        Installer.install type, location 
      
      when 'clean'

        location = ARGV[1] || '.'
        Installer.clean location   

      else

        # We didn't find a task
        puts 'Task not found'

      end

    end

    def self.display_help
      puts 'Usage: bonethug task [argument]...'
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bonethug-0.0.7 lib/bonethug/cli.rb
bonethug-0.0.6 lib/bonethug/cli.rb