Class: Octopress::Init

Inherits:
Command show all
Defined in:
lib/octopress/commands/init.rb

Class Method Summary collapse

Methods inherited from Command

inherited, #init_with_program, subclasses

Class Method Details

.init_with_program(p) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/octopress/commands/init.rb', line 3

def self.init_with_program(p)
  p.command(:init) do |c|
    c.syntax 'init <PATH> [options]'
    c.description "Add Octopress's default scaffolding to your site."
    c.option 'force', '-f', '--force', 'Overwrite files if they already exist.'

    c.action do |args, options|
      Scaffold.new(args, options).write
    end
  end
end