Class: Registry::Uninstaller
- Defined in:
- lib/radiant/extension/script.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(extension) ⇒ Uninstaller
constructor
A new instance of Uninstaller.
- #migrate_down ⇒ Object
- #remove_extension_directory ⇒ Object
- #uninstall ⇒ Object
Methods inherited from Action
#file_utils, #rake, #tasks_include?
Constructor Details
#initialize(extension) ⇒ Uninstaller
Returns a new instance of Uninstaller.
87 88 89 |
# File 'lib/radiant/extension/script.rb', line 87 def initialize(extension) self.name = extension.name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
86 87 88 |
# File 'lib/radiant/extension/script.rb', line 86 def name @name end |
Instance Method Details
#migrate_down ⇒ Object
96 97 98 |
# File 'lib/radiant/extension/script.rb', line 96 def migrate_down rake "radiant:extensions:#{name}:migrate VERSION=0" end |
#remove_extension_directory ⇒ Object
100 101 102 |
# File 'lib/radiant/extension/script.rb', line 100 def remove_extension_directory rm_r(File.join(RAILS_ROOT, 'vendor', 'extensions', name)) end |
#uninstall ⇒ Object
91 92 93 94 |
# File 'lib/radiant/extension/script.rb', line 91 def uninstall migrate_down remove_extension_directory end |