Class: Lazylead::Task::Savepoint
- Inherits:
-
Object
- Object
- Lazylead::Task::Savepoint
- Defined in:
- lib/lazylead/task/savepoint.rb
Overview
Send current configuration to admin user.
Instance Method Summary collapse
-
#initialize(log = Log.new) ⇒ Savepoint
constructor
A new instance of Savepoint.
- #run(_, postman, opts) ⇒ Object
Constructor Details
Instance Method Details
#run(_, postman, opts) ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/lazylead/task/savepoint.rb', line 41 def run(_, postman, opts) opts["max_size"] = "25" unless opts.key? "max_size" path = File.join( Lazylead::Home.new.dir, ARGV[ARGV.find_index("--sqlite") + 1] ) return unless File.file?(path) && less_mb(path, opts["max_size"]) postman.send opts.merge("attachments" => [path]) end |