Module: Wing
- Defined in:
- lib/wing.rb,
lib/wing/version.rb
Defined Under Namespace
Classes: Config, Generator
Constant Summary
collapse
- TEMPLATES =
File.expand_path("../wing/templates", __FILE__)
- ASSETS =
File.expand_path("../wing/assets", __FILE__)
- SCRIPTS =
File.expand_path("../wing/scripts", __FILE__)
- VERSION =
"0.1.1"
Class Method Summary
collapse
Class Method Details
.help ⇒ Object
31
32
33
34
35
|
# File 'lib/wing.rb', line 31
def self.help
puts "Usage: wing [init|gen] [OPTIONS] [FILES]\n EOS\nend\n"
|
.init ⇒ Object
37
38
39
40
|
# File 'lib/wing.rb', line 37
def self.init
FileUtils.cp File.join(TEMPLATES, "config.yml"), "config.yml"
FileUtils.cp File.join(TEMPLATES, "gitignore"), ".gitignore"
end
|
.run(argv) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/wing.rb', line 12
def self.run(argv)
files = if argv.size > 1
argv.drop(1)
else
Dir.glob("**/*.md")
end
case argv[0]
when "init"
init
when "html"
Generator.new(files).gen_html
when "gen"
Generator.new(files).gen_pdf
else
help
end
end
|