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
Constructor Details
#initialize(extension) ⇒ Uninstaller
Returns a new instance of Uninstaller.
64 65 66 |
# File 'lib/radiant/extension/script.rb', line 64 def initialize(extension) self.name = extension.name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
63 64 65 |
# File 'lib/radiant/extension/script.rb', line 63 def name @name end |
Instance Method Details
#migrate_down ⇒ Object
73 74 75 |
# File 'lib/radiant/extension/script.rb', line 73 def migrate_down rake "radiant:extensions:#{name}:migrate VERSION=0" end |
#remove_extension_directory ⇒ Object
77 78 79 |
# File 'lib/radiant/extension/script.rb', line 77 def remove_extension_directory FileUtils.rm_r(File.join(RAILS_ROOT, 'vendor', 'extensions', name)) end |
#uninstall ⇒ Object
68 69 70 71 |
# File 'lib/radiant/extension/script.rb', line 68 def uninstall migrate_down remove_extension_directory end |