Sha256: c55b2774901a98fda7b0876c7ae009de9f3ffc6646802b5a05e8aa72aa35d8ee
Contents?: true
Size: 689 Bytes
Versions: 26
Compression:
Stored size: 689 Bytes
Contents
module ContentfulMiddleman module LocalData class Store include ContentfulMiddleman::Tools::Backup::InstanceMethods class << self def base_path=(path) @base_path = path end def base_path @base_path end end def initialize(files, folder) @files = files @folder = folder end def write do_with_backup backup_name, path_to_backup do @files.each(&:write) end end private def backup_name "#{@folder}-data-backup" end def path_to_backup ::File.join(self.class.base_path, @folder) end end end end
Version data entries
26 entries across 26 versions & 1 rubygems