class Gem::Tasks::Console
def console(name=nil)
-
(Array-)
Parameters:
-
name(Symbol, String) --
def console(name=nil) gemspec = @project.gemspec(name) arguments = [@command] # add -I options for lib/ or ext/ directories arguments.push(*gemspec.require_paths.map { |dir| "-I#{dir}" }) # push on additional options arguments.push(*@options) if @project.bundler? # use `bundle console` unless were were using custom command/options if (@command == DEFAULT_CONSOLE && @options.empty?) arguments = ['bundle', 'console'] else arguments.unshift('bundle', 'exec') end end return run(*arguments) end