Class: Backup::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/backup/runner.rb

Overview

Is invoked from the command line application and invokes the application’s optons as provided by the user on the command line

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Runner

Takes the command line options and parses them



14
15
16
# File 'lib/backup/runner.rb', line 14

def initialize(argv)
  @options = Options.new(argv)
end

Instance Method Details

#runObject

Operates on the options and invokes the respective functions



19
20
21
22
23
24
25
# File 'lib/backup/runner.rb', line 19

def run
  if @options.cron
    create_cron
  elsif @options.database or @options.file
    create_backup
  end
end