Sha256: 0d79759c7e0eb11ef0d78bca3da83f1d55478b9b8b443c9a70feb05fbe952223

Contents?: true

Size: 1005 Bytes

Versions: 1

Compression:

Stored size: 1005 Bytes

Contents

require 'thor'
require_relative '../agile_utils'
module AgileUtils
  class CLI < Thor
    desc 'main', 'Main entry point'
    # method_option :commit,
    #               aliases: "-c",
    #               desc: "commit your changes",
    #               default: false
    def main
      opts = options.symbolize_keys

      if opts[:version]
        puts "You are using #{AgileUtils::PROJECT_NAME} version #{AgileUtils::VERSION}"
        exit
      end

      puts "FYI: your options #{opts}"
      execute(opts)
    end

    desc "usage", "Display help screen"
    def usage
      # Add your usage here (How to automate this task from Vim?)
      # try running :r !./bin/agile_utils help run
      puts <<-EOS
      Add your usage here.
      EOS
    end

    default_task :usage

    private

    # @param [Hash<Symbol, Object>] options the options argument
    def execute(options = {})
      # TODO: just a place holder for now!
      puts "FYI: execute with options: #{options}"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
agile_utils-0.0.2 lib/agile_utils/cli.rb