Class: Nib::Console

Inherits:
Object
  • Object
show all
Includes:
Command, History
Defined in:
lib/nib/console.rb

Constant Summary collapse

SCRIPT =
<<-SH.freeze
  has_pry=false
  has_boot=false
  if hash pry 2>/dev/null ; then
    has_pry=true
  fi
  if [ -f config/boot.rb ]; then
    has_boot=true
  fi
  if [ -f bin/console ]; then
    bin/console
  elif [ -f bin/rails ]; then
    rails console
  elif [ \\$has_boot = true ] && [ \\$has_pry = true ]; then
    pry -r ./config/boot
  elif [ \\$has_boot = true ]; then
    irb -r ./config/boot
  elif [ \\$has_pry = true ]; then
    bundle config console pry
    bundle console
  else
    bundle console
  fi
SH

Constants included from History

History::PATH

Method Summary

Methods included from Command

#alternate_compose_file, #entrypoint, #execute, included, #initialize, #script

Methods included from History

#alternate_compose_file, #irbrc, prepended, #pryrc, #wrap