lib/rubyneat/cli/main.rb in rubyneat-0.3.5.alpha.6 vs lib/rubyneat/cli/main.rb in rubyneat-0.4.0.alpha.3
- old
+ new
@@ -1,6 +1,6 @@
-require 'rubyneat/cli/generate'
+require 'rubyneat/cli'
module RubyNEAT
module Cli
class List < Thor
@@ -41,23 +41,21 @@
def version
puts SemVer.find.format "%M.%m.%p%s"
end
desc 'console', 'Run RubyNEAT interactively'
- def console
- #TODO: Finish the console
- puts "Not Implemented Yet."
- end
+ subcommand 'console', Console
desc 'run <neater> [<neater> <neater> ...] [OPTS]', 'Run a Neater'
option :log, type: :string, banner: 'info|warn|debug|error'
def neater(*neaters)
NEAT::controller.verbosity = options[:verbose].to_i if options[:verbose]
eval %{$log.level = Logger::#{options[:log].upcase}} if options[:log]
neaters.map do |neater|
"#{neater}_neat.rb"
end.each do |file|
+ NEAT::controller.neater = file
load file
end
end
map run: :neater