method

capture_command

rails latest stable - Class: Rails::Generators::AppBase

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

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