method
capture_command
v8.1.1 -
Show latest stable
- Class:
Rails::Generators::AppBase
capture_command(command, pattern = nil)private
No documentation available.
# File railties/lib/rails/generators/app_base.rb, line 539
def capture_command(command, pattern = nil)
output = `#{command}`
if pattern
output[pattern]
else
output
end
rescue SystemCallError
nil
end