class Cult::CLI::ConsoleContext

Attributes

original_argv[RW]
project[R]

Public Class Methods

new(project, argv) click to toggle source
# File lib/cult/cli/console_cmd.rb, line 15
def initialize(project, argv)
  @project = project
  # super(project)

  @original_argv = [$0, *argv]
  ENV['CULT_PROJECT'] = self.path
end

Public Instance Methods

cult(*argv) click to toggle source
# File lib/cult/cli/console_cmd.rb, line 40
def cult(*argv)
  system $0, *argv
end
load_rc() click to toggle source
# File lib/cult/cli/console_cmd.rb, line 27
def load_rc
  consolerc = project.location_of(".cultconsolerc")

  # We don't `load' so the rc file has a more convenient context.
  eval File.read(consolerc) if File.exist?(consolerc)
end
path() click to toggle source
# File lib/cult/cli/console_cmd.rb, line 23
def path
  project.path
end

Private Instance Methods

exit(*) click to toggle source
Calls superclass method
# File lib/cult/cli/console_cmd.rb, line 35
        def exit(*)
  # IRB tries to alias this. And it must be private, or it warns.  WTF.
  super
end