Sha256: f9bf9168b197921179aca236ac3f9cd339d41c44c159479dbc60ca93893ece5f
Contents?: true
Size: 763 Bytes
Versions: 19
Compression:
Stored size: 763 Bytes
Contents
module Evertils module Common module Query class Backup < Query::Base # # @since 0.2.8 def files(*files) date = DateTime.now backup_notebook_name = 'Backup' nm = Entity::Note.new # create the backup notebook if it does not exist nb_entity = Entity::Notebook.new nb = nb_entity.find(backup_notebook_name) if nb_entity.find(backup_notebook_name).nil? nb = nb_entity.create(backup_notebook_name) end @entity = nm.create(title: "Backup: #{date}", body: "", parent_notebook: nb, files: files) end # # @since 0.2.9 def expunge! @entity.expunge! end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems