# File lib/sugar-high/file.rb, line 118 def self.insert_into file_name, *args, &block options = last_option args content = Insert.content options, *args, &block file = File.new(file_name) return nil if !File.exist?(file) # already inserted? return nil if content.blank? || (file.read =~ /#{content}/) place, marker = if options[:before] [ :before, options[:before] ] else [ :after, options[:after] ] end marker = Insert.get_marker marker return nil if !(File.new(file.path).read =~ /#{marker}/) Mutate.mutate_file file.path, marker, place do content end end