def create_model(trigger, text, config_file = nil)
      config_file ||= Backup::Config.config_file
      model_path = File.join(File.dirname(config_file), "models")
      model_file = File.join(model_path, trigger.to_s + ".rb")

      create_config(nil, config_file) unless File.exist?(config_file)

      indent = text.lines.first.match(/^ */)[0].length
      text = text.lines.map { |l| l[indent..-1] }.join
      config = <<-EOS.gsub(/^        /, "")
        # encoding: utf-8

        #{text}
      EOS

      File.open(model_file, "w") { |f| f.write config }
    end
def create_model(trigger, text, config_file = nil)
      config_file ||= Backup::Config.config_file
      model_path = File.join(File.dirname(config_file), "models")
      model_file = File.join(model_path, trigger.to_s + ".rb")

      create_config(nil, config_file) unless File.exist?(config_file)

      indent = text.lines.first.match(/^ */)[0].length
      text = text.lines.map { |l| l[indent..-1] }.join
      config = <<-EOS.gsub(/^        /, "")
        # encoding: utf-8

        #{text}
      EOS

      File.open(model_file, "w") { |f| f.write config }
    end
Creates a model file.

 Pass +config_file+ if it won"t be at the default path +~/Backup/+.

 Creates the model as +/models/<trigger>.rb+, relative to the path
 of +config_file+.

 Note that the first line in +text+ will set the indent for the text being
 given and that indent will be removed from all lines in +text+