class Ninny::CLI

Handle the application command line parsing and the dispatch to various command objects

@api public

Constants

Error

Error raised by this runner

Public Instance Methods

new_staging(*) click to toggle source
# File lib/ninny/cli.rb, line 48
def new_staging(*)
  if options[:help]
    invoke :help, ['new_staging']
  else
    require_relative 'commands/new_staging'
    Ninny::Commands::NewStaging.new(options).execute
  end
end
setup(*) click to toggle source
# File lib/ninny/cli.rb, line 60
def setup(*)
  if options[:help]
    invoke :help, ['setup']
  else
    require_relative 'commands/setup'
    Ninny::Commands::Setup.new(options).execute
  end
end
stage_up(pull_request_id = nil) click to toggle source
# File lib/ninny/cli.rb, line 36
def stage_up(pull_request_id = nil)
  if options[:help]
    invoke :help, ['stage_up']
  else
    require_relative 'commands/stage_up'
    Ninny::Commands::StageUp.new(pull_request_id, options).execute
  end
end
staging_branch(*) click to toggle source
# File lib/ninny/cli.rb, line 23
def staging_branch(*)
  if options[:help]
    invoke :help, ['staging_branch']
  else
    require_relative 'commands/staging_branch'
    Ninny::Commands::StagingBranch.new(options).execute
  end
end
version() click to toggle source
# File lib/ninny/cli.rb, line 15
def version
  require_relative 'version'
  puts "v#{Ninny::VERSION}"
end