Module: Format

Defined in:
lib/tasks/helpers/format.rb

Overview

This file is distributed under New Relic’s license terms. See github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. frozen_string_literal: true

Constant Summary collapse

DEFAULT_CONFIG_PATH =
'ruby-agent-configuration.mdx'

Instance Method Summary collapse

Instance Method Details

#output(format) ⇒ Object



8
9
10
11
# File 'lib/tasks/helpers/format.rb', line 8

def output(format)
  result = build_erb(format).result(binding).split("\n").map(&:rstrip).join("\n").gsub('.  ', '. ')
  File.write(DEFAULT_CONFIG_PATH, result)
end