Class: Bunto::Commands::Page
- Inherits:
-
Command
- Object
- Command
- Bunto::Commands::Page
show all
- Defined in:
- lib/bunto/commands/page.rb
Defined Under Namespace
Classes: PageArgParser, PageFileInfo
Class Method Summary
collapse
Class Method Details
.init_with_program(prog) ⇒ Object
4
5
6
7
8
9
10
11
12
13
|
# File 'lib/bunto/commands/page.rb', line 4
def self.init_with_program(prog)
prog.command(:page) do |c|
c.syntax 'page NAME'
c.description 'Creates a new page with the given NAME'
options.each {|opt| c.option *opt }
c.action { |args, options| process args, options }
end
end
|
.options ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/bunto/commands/page.rb', line 15
def self.options
[
['extension', '-x EXTENSION', '--extension EXTENSION', 'Specify the file extension'],
['layout', '-l LAYOUT', '--layout LAYOUT', "Specify the page layout"],
['force', '-f', '--force', 'Overwrite a page if it already exists']
]
end
|
.process(args = [], options = {}) ⇒ Object