Sha256: 9688cae377fb70b246ab0bcffca2c4da6203a9f9ddb5ef9a3bf96e392275ea35
Contents?: true
Size: 781 Bytes
Versions: 3
Compression:
Stored size: 781 Bytes
Contents
require 'commander' require_relative '../lib/mailer' module MailCommand def mail(c) c.syntax = 'm2m mail [options]' c.summary = '将Markdown转换为HTML,并邮件发送给某人' c.description = '' c.option '-s STRING', '--subject STRING', String, '邮件主题,可选' c.option '-a STRING', '--addressee STRING', String, '收件人,可选' c.option '--silent', '静默发送,不提示' c.option '-m STRING', '--markdown STRING', String, '要发送的markdown文件,如果不指定,则使用最近修改的文件' c.action do |args, options| util = Util.instance #合并目录 util.workbench = util.get_merge_path('./') mailer = Mailer.new mailer.send options.addressee, options.markdown, options.subject, options.silent end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
m2m-0.2.3 | exe/mailer.rb |
m2m-0.2.1 | exe/mailer.rb |
m2m-0.2.0 | exe/mailer.rb |