Class: Spring::Commands::RailsConsole

Inherits:
Command
  • Object
show all
Defined in:
lib/spring/commands.rb

Instance Method Summary collapse

Methods inherited from Command

preloads, #preloads, preloads=

Instance Method Details

#call(args) ⇒ Object



165
166
167
168
# File 'lib/spring/commands.rb', line 165

def call(args)
  ARGV.replace args
  ::Rails::Console.start(::Rails.application)
end

#descriptionObject



170
171
172
# File 'lib/spring/commands.rb', line 170

def description
  nil
end

#env(tail) ⇒ Object



157
158
159
# File 'lib/spring/commands.rb', line 157

def env(tail)
  tail.first if tail.first && !tail.first.index("-")
end

#setupObject



161
162
163
# File 'lib/spring/commands.rb', line 161

def setup
  require "rails/commands/console"
end