Class: ImapTickler::CLI

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

Class Method Summary collapse

Class Method Details

.execute(input, output, arguments = []) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/imap_tickler/cli.rb', line 6

def self.execute(input,output,arguments=[])
  options = {:config_file => "~/.imap_tickler.conf"}
  parser = OptionParser.new do |opts|
    opts.banner = "        Usage: \#{File.basename($0)} [options]\n\n        Options are:\n    BANNER\n    opts.on( \"-F path\", \"\", String,\n            \"Load an alternate config file\") do |opt|\n      options[:config_file] = opt\n            end\n  end\n  parser.parse(arguments)\n  config = YAML.load_file(File.expand_path(options[:config_file]))\n  Tickler.new(config).start\nend\n".gsub(/^          /,'')