Skip to content

Instantly share code, notes, and snippets.

@Epictetus
Forked from naoty/gist:3759914
Created September 21, 2012 06:25
Show Gist options
  • Save Epictetus/3760012 to your computer and use it in GitHub Desktop.
Save Epictetus/3760012 to your computer and use it in GitHub Desktop.
require 'active_support/core_ext/string'
module Rails
class << self
def cmd
command = 'console' if defined?(Rails::Console)
command = 'runner' if defined?(Rails::Runner)
command = 'server' if defined?(Rails::Server)
@_command ||= ActiveSupport::StringInquirer.new(command)
end
def cmd=(command)
@_command = ActiveSupport::StringInquirer.new(command)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment