class Thor::Actions::InjectIntoFile

def initialize(base, destination, data, config)

def initialize(base, destination, data, config)
  super(base, destination, {verbose: true}.merge(config))
  @behavior, @flag = if @config.key?(:after)
    [:after, @config.delete(:after)]
  else
    [:before, @config.delete(:before)]
  end
  @replacement = data.is_a?(Proc) ? data.call : data
  @flag = Regexp.escape(@flag) unless @flag.is_a?(Regexp)
end