class Rails::Generators::CredentialsGenerator

def render_template_to_encrypted_file

def render_template_to_encrypted_file
  empty_directory File.dirname(content_path)
  content = nil
  encrypted_file.change do |tmp_path|
    template("credentials.yml", tmp_path, force: true, verbose: false) do |rendered|
      content = rendered
    end
  end
  content
end