Sha256: f1ea3f7c29a0216335c70e7b540f0ab49af54d45a11a924cb671e2d2cb7a9ef6

Contents?: true

Size: 422 Bytes

Versions: 2

Compression:

Stored size: 422 Bytes

Contents

require "picon/version"

module Picon
  class Command
    def self.run(argv)
      new(argv).run
    end

    def initialize(argv)
      @argv = argv
    end

    def run
      case subcommand
      when "generate"
        Generator.run
      when "version"
        puts VERSION
      else
        abort "Usage: picon {generate|version}"
      end
    end

    private

    def subcommand
      @argv[0]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picon-1.0.0 lib/picon/command.rb
picon-0.0.1 lib/picon/command.rb