Class: JekyllPageBoilerplate::Application
- Inherits:
-
Thor
- Object
- Thor
- JekyllPageBoilerplate::Application
- Defined in:
- lib/jekyll_page_boilerplate_cli.rb
Constant Summary collapse
- SHARED_OPTIONS =
{ title: { type: :string, aliases: [:t], desc: "`path/<title>.md` `'Foo Bar' > foo-bar.md`" }, path: { type: :string, aliases: [:p], desc: "`<path>/title.md`" }, slug: { type: :string, aliases: [:u], desc: "`path/<slug-template>.md` `{{title}}-{{date}}`" }, timestamp: { type: :boolean, aliases: [:s], desc: "`path/<time.now>-title.md`" }, suffix: { type: :string, aliases: [:x], desc: "`path/title.<md, markdown, txt>`" } # TODO: rename suffix to ext ^^^ }
Instance Method Summary collapse
- #create(plate, title = nil, *args) ⇒ Object
- #init ⇒ Object
- #list ⇒ Object
- #readme ⇒ Object
- #version ⇒ Object
Instance Method Details
#create(plate, title = nil, *args) ⇒ Object
36 37 38 39 40 |
# File 'lib/jekyll_page_boilerplate_cli.rb', line 36 def create plate, title = nil, *args = .dup.transform_values(&:dup) || {} [:title] ||= title if title JekyllPageBoilerplate.page plate, args, end |
#init ⇒ Object
23 24 25 |
# File 'lib/jekyll_page_boilerplate_cli.rb', line 23 def init puts JekyllPageBoilerplate.init end |
#list ⇒ Object
28 29 30 |
# File 'lib/jekyll_page_boilerplate_cli.rb', line 28 def list JekyllPageBoilerplate.list end |
#readme ⇒ Object
43 44 45 |
# File 'lib/jekyll_page_boilerplate_cli.rb', line 43 def readme JekyllPageBoilerplate.readme end |
#version ⇒ Object
18 19 20 |
# File 'lib/jekyll_page_boilerplate_cli.rb', line 18 def version puts JekyllPageBoilerplate::VERSION.to_s end |