Sha256: 125566ba6f9403727a8da6f22edfd3787ad5e1ab5917b20ebaab449a9b88a744
Contents?: true
Size: 485 Bytes
Versions: 2
Compression:
Stored size: 485 Bytes
Contents
Bloggit::Cmdline.register do |cmd, site| unless site.nil? post_cmd = CmdParse::Command.new( 'post', true, true ) post_cmd.short_desc = "Post Management" cmd.add_command( post_cmd ) add_post = CmdParse::Command.new( 'new', false ) add_post.short_desc = "Create a new blog post" add_post.set_execution_block do |args| post = Bloggit::Post.to_file(args.to_s) puts "#{post.filename} created." end post_cmd.add_command( add_post ) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bloggit-1.0.3 | lib/bloggit/commands/post_cmd.rb |
bloggit-1.0.7 | lib/bloggit/commands/post_cmd.rb |