Sha256: 3c7310a9fd1e59257bdc180c14c262482cd4eeabd927542789c640585bd8283a
Contents?: true
Size: 502 Bytes
Versions: 9
Compression:
Stored size: 502 Bytes
Contents
module OdaniaOps module Implementations module Backup class Mysql attr_accessor :template, :host, :opts def initialize(host, opts) self.host = host self.opts = opts self.template = File.new(File.join(BASE_DIR, 'templates', 'backup', 'mysql.rb.erb')).read end def render Erubis::Eruby.new(self.template).result(binding) end def write(target_file) File.write(target_file, self.render) `chmod +x #{target_file}` end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems