module Aws::Cfn::Dsl::Maintainer
Public Class Methods
included(includer)
click to toggle source
# File lib/aws/cfn/dsl/mixins/maintainer.rb, line 35 def self.included(includer) end
Public Instance Methods
i_am_maintainer(file)
click to toggle source
# File lib/aws/cfn/dsl/mixins/maintainer.rb, line 22 def i_am_maintainer(file) # mod = module_name 2 if File.exists?(file) src = IO.read(file) mtc = src.match(%r'#{maintainer 2}') iam = (not mtc.nil? or src.match(%r'#\s*maintainer:').nil?) ovr = @config[:overwrite] iam or ovr else true end end
maintainer(parts=-1)
click to toggle source
# File lib/aws/cfn/dsl/mixins/maintainer.rb, line 6 def maintainer(parts=-1) "maintainer: #{module_name parts}" end
maintainer_comment(indent=' ')
click to toggle source
# File lib/aws/cfn/dsl/mixins/maintainer.rb, line 10 def maintainer_comment(indent=' ') "#{indent}# WARNING: This code is generated. Your changes may be overwritten!\n" + "#{indent}# Remove this message and/or set the 'maintainer: <author name>' when you need your changes to survive.\n" + "#{indent}# Abscence of the 'maintainer: ' will be considered conscent to overwrite.\n" + "#{indent}# #{maintainer 3}\n" + "#\n" end
print_maintainer(indent=' ')
click to toggle source
# File lib/aws/cfn/dsl/mixins/maintainer.rb, line 18 def print_maintainer(indent=' ') writeln maintainer_comment(indent) end