Class: Amiba::Page::Destroy
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Amiba::Page::Destroy
- Includes:
- Generator
- Defined in:
- lib/amiba/page.rb
Overview
Thor task to destroy a page. It will delete all files matching the page name
Instance Method Summary collapse
Methods included from Generator
Instance Method Details
#init_source ⇒ Object
106 107 108 |
# File 'lib/amiba/page.rb', line 106 def init_source @source = Amiba::Source::Page.new(name, format) end |
#page ⇒ Object
110 111 112 113 114 115 |
# File 'lib/amiba/page.rb', line 110 def page if ask("Are you sure you want to delete #{@source.filename}?" + " This is irreversible (y/n): ") remove_file(@source.filename) end end |