Class: Octopress::Commands::Isolate
- Inherits:
-
Octopress::Command
- Object
- Octopress::Command
- Octopress::Commands::Isolate
- Defined in:
- lib/octopress/commands/isolate.rb
Class Method Summary collapse
Methods inherited from Octopress::Command
inherited, #init_with_program, subclasses
Class Method Details
.init_with_program(p) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/octopress/commands/isolate.rb', line 4 def self.init_with_program(p) p.command(:isolate) do |c| c.syntax 'isolate <POST> [options]' c.description "Move all posts not matching selected post to _posts/_exile. Command accepts path to post or search string." CommandHelpers. c c.action do |args, | ['path'] = args.first if ['path'] && !File.exist?(['path']) ['path'] = CommandHelpers.select_posts(['path'], 'isolate') end isolate_post() end end p.command(:integrate) do |c| c.syntax 'integrate' c.description "Reintegrate posts from _posts/_exile." CommandHelpers. c c.action do |args, | integrate_posts() end end end |