Sha256: b180f614476bec29d28e5da62bf66d4e161b792c2b684a6bf3c6fa3ccdc1b122
Contents?: true
Size: 900 Bytes
Versions: 2
Compression:
Stored size: 900 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'commander' require_relative '../lib/generator' require_relative './site' require_relative './mailer' require_relative './setup' require_relative './server' class Application include Commander::Methods # include whatever modules you need include SiteCommand include MailCommand include ServerCommand include SetupCommand def run program :name, 'm2m' program :version, '0.0.1' program :description, 'Markdown to More' default_command :site #生成博客 command :site do |c| self.site(c) end #启动服务器 command :server do |c| self.server(c) end #发送邮件 command :mail do |c| self.mail(c) end #配置相关 command :setup do |c| self.setup c end run! end end Application.new.run # MyApplication.new.run if $0 == __FILE__
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
m2m-0.2.1 | exe/m2m |
m2m-0.2.0 | exe/m2m |