Sha256: 4e30beb1548ed268ff60ca4043ce8e1352ec110987d3ee5647c1d1b66125b3ba

Contents?: true

Size: 804 Bytes

Versions: 1

Compression:

Stored size: 804 Bytes

Contents

require 'trollop'

require 'heirloom/cli/build'
require 'heirloom/cli/list'
require 'heirloom/cli/show'
require 'heirloom/cli/update'
require 'heirloom/cli/download'
require 'heirloom/cli/destroy'

module Heirloom
  module CLI
    def self.start
      cmd = ARGV.shift

      case cmd
      when 'list'
        CLI::List.new.list
      when 'show'
        CLI::Show.new.show
      when 'build'
        CLI::Build.new.build
      when 'update'
        CLI::Update.new.update
      when 'download'
        CLI::Download.new.download
      when 'destroy', 'delete'
        CLI::Destroy.new.destroy
      else
        puts "Unkown command: '#{cmd}'."
        puts "heirloom [list|show|build|update|download|destroy] OPTIONS"
        puts "Append -h for help on specific command."
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heirloom-0.2.0 lib/heirloom/cli.rb