class Gemmy::CLI

Command line interface

Run from command line:

gemmy <arguments>
e.g. gemmy help

Start from code with Gemmy::CLI.run

Public Class Methods

run(arguments: nil) click to toggle source

Start the CLI @param arguments [Array<String>] passed to thor, defaults to ARGV

# File lib/gemmy/cli.rb, line 14
def self.run(arguments: nil)
  # Store a copy of the arguments.
  # The originals are shifted so they don't intefere with gets
  arguments ||= ARGV.clone
  ARGV.clear

  # Can't make this conditional on "__FILE__ == $0"
  # Because of the way gem executables are run
  start arguments
end

Public Instance Methods

make_gem(name) click to toggle source
# File lib/gemmy/cli.rb, line 30
def make_gem(name)
  Gemmy::Tasks::MakeGem.run(name)
end
test() click to toggle source
# File lib/gemmy/cli.rb, line 37
def test
  Gemmy::Tests.run
end
v() click to toggle source
# File lib/gemmy/cli.rb, line 44
def v
  puts Gemmy::VERSION
end