Class: Lazylead::CLI::App

Inherits:
Object
  • Object
show all
Defined in:
lib/lazylead/cli/app.rb

Overview

APP start command.

By default, the app will check the version of the database structure and

apply the missing change sets (more https://github.com/dgroup/vcs4sql).
Author

Yurii Dubinka ([email protected])

Copyright

Copyright © 2019-2020 Yurii Dubinka

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(log, schedule, smtp = Smtp.new) ⇒ App

Returns a new instance of App.



44
45
46
47
48
# File 'lib/lazylead/cli/app.rb', line 44

def initialize(log, schedule, smtp = Smtp.new)
  @log = log
  @schedule = schedule
  @smtp = smtp
end

Instance Method Details

#run(opts) ⇒ Object



50
51
52
53
54
55
# File 'lib/lazylead/cli/app.rb', line 50

def run(opts)
  apply_vcs_migration opts
  enable_active_record opts
  @smtp.enable
  schedule_tasks
end