class PhilColumns::Cli::Generate

Public Class Methods

banner( command, namespace=nil, subcommand=false ) click to toggle source
handle_argument_error( command, error, _, __ ) click to toggle source
# File lib/phil_columns/cli/generate.rb, line 20
def self.handle_argument_error( command, error, _, __ )
  method = "handle_argument_error_for_#{command.name}"

  if respond_to?( method )
    send( method, command, error )
  else
    handle_argument_error_default( command, error )
  end
end
handle_argument_error_default( command, error ) click to toggle source
# File lib/phil_columns/cli/generate.rb, line 30
def self.handle_argument_error_default( command, error )
  $stdout.puts "Incorrect usage of generate subcommand: #{command.name}"
  $stdout.puts "  #{error.message}", ''
  $stdout.puts "For correct usage:"
  $stdout.puts "  phil_columns generate help #{command.name}"
end
handle_no_command_error( name ) click to toggle source
# File lib/phil_columns/cli/generate.rb, line 37
def self.handle_no_command_error( name )
  $stdout.puts "Unrecognized command: #{name}"
end

Public Instance Methods

seed( name ) click to toggle source
# File lib/phil_columns/cli/generate.rb, line 16
def seed( name )
  PhilColumns::Command::Generate::Seed.new( options.merge( seed_name: name )).execute
end