Class: Radiant::Extension::Script::Uninstall

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/radiant/extension/script.rb

Instance Attribute Summary

Attributes included from Util

#extension, #extension_name

Instance Method Summary collapse

Methods included from Util

#extension_paths, #find_extension, #installed?, #load_extensions, #to_extension_name

Constructor Details

#initialize(args = []) ⇒ Uninstall

Returns a new instance of Uninstall.

Raises:

  • (ArgumentError)


274
275
276
277
278
279
280
281
282
# File 'lib/radiant/extension/script.rb', line 274

def initialize(args=[])
  raise ArgumentError, "You must specify an extension to uninstall." if args.blank?
  self.extension_name = to_extension_name(args.shift)
  if installed?
    find_extension && extension.uninstall
  else
    puts "#{extension_name} is not installed."
  end
end