extract command result as method

Extract method to get run result.