Sha256: f204b05a7a57d487be941f7562a72f4d4ec65144b7ba102d8d7144bd1dde2ed3

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

Bloggit::Cmdline.register do |cmd, site|
  unless site.nil?

    page_cmd = CmdParse::Command.new( 'page', true, true )
    page_cmd.short_desc = "Page Management"
    cmd.add_command( page_cmd )

    add_page = CmdParse::Command.new( 'new', false )
    add_page.short_desc = "Create a new page"
    add_page.set_execution_block do |args|
      page = Bloggit::Page.to_file(args.to_s)
      puts "#{page.filename} created."
    end

    page_cmd.add_command( add_page )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bloggit-1.0.3 lib/bloggit/commands/page_cmd.rb
bloggit-1.0.7 lib/bloggit/commands/page_cmd.rb