require 'optparse' module Feed2Mail class CLI def self.run(args) config = Feed2Mail::Config.new config.load OptionParser.new do |o| o.banner = "Usage: #{File.basename $0} [options]" o.on '-v', '--verbose', 'verbose mode' do |v| config.verbose = v end o.on_tail '-h', '--help', 'show this message' do puts o exit end end.parse! report = Feed2Mail::Report.new config report.update report.mail :from => 'tj+from@a13.fr', :to => 'tj+to@a13.fr' end end end