Method: FluentPluginGenerator::ApacheLicense#preamble

Defined in:
lib/fluent/command/plugin_generator.rb

#preamble(user_name) ⇒ Object



339
340
341
342
343
344
345
346
# File 'lib/fluent/command/plugin_generator.rb', line 339

def preamble(user_name)
  @preamble ||= @preamble_source.dup.tap do |source|
    source.gsub!(/\[yyyy\]/, "#{Date.today.year}-")
    source.gsub!(/\[name of copyright owner\]/, user_name)
    source.gsub!(/^ {2}|^$/, "#")
    source.chomp!
  end
end