Class: Remove
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Remove
- Includes:
- Thor::Actions, Util
- Defined in:
- lib/commands/remove.rb
Instance Method Summary collapse
Methods included from Util
#add_to_git, #alter_index_html, #alter_link, #content_root, #each_presentation, #git_repository?, #has_remote?, #init_git, #parse_config, #presentation, #pull_from_git, #request_token
Instance Method Details
#remove_presentation ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/commands/remove.rb', line 14 def remove_presentation presentation @name do |master,client| if @yes.nil? @yes = yes? "do you really want to delete #{File.basename(master)}?(y,N)" end if @yes FileUtils.rm_rf master FileUtils.rm_rf client end end alter_link(@name) do | link | link.parent.remove end end |