Class: EmptyCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- EmptyCommand
- Defined in:
- lib/gem-empty/command.rb
Overview
rubygems plugin to empty GEM_HOME
Constant Summary collapse
- GEM_REMOVAL_ERRORS =
[ Gem::DependencyRemovalException, Gem::InstallError, Gem::GemNotInHomeException, Gem::FilePermissionError, ]
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#arguments ⇒ Object
:nodoc:.
-
#defaults_str ⇒ Object
:nodoc:.
-
#description ⇒ Object
:nodoc:.
- #execute(opts = {}) ⇒ Object
-
#initialize ⇒ EmptyCommand
constructor
A new instance of EmptyCommand.
-
#usage ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ EmptyCommand
Returns a new instance of EmptyCommand.
18 19 20 |
# File 'lib/gem-empty/command.rb', line 18 def initialize super 'empty', description end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/gem-empty/command.rb', line 9 def @options end |
Instance Method Details
#arguments ⇒ Object
:nodoc:
22 23 24 |
# File 'lib/gem-empty/command.rb', line 22 def arguments # :nodoc: "empty remove all gems from current GEM_HOME." end |
#defaults_str ⇒ Object
:nodoc:
30 31 32 |
# File 'lib/gem-empty/command.rb', line 30 def defaults_str # :nodoc: "" end |
#description ⇒ Object
:nodoc:
34 35 36 |
# File 'lib/gem-empty/command.rb', line 34 def description # :nodoc: "Remove all gems from current 'GEM_HOME'." end |
#execute(opts = {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/gem-empty/command.rb', line 38 def execute(opts = {}) remove_gems(opts) rescue *GEM_REMOVAL_ERRORS => exception alert_error "#{exception.class}: #{exception.}" end |
#usage ⇒ Object
:nodoc:
26 27 28 |
# File 'lib/gem-empty/command.rb', line 26 def usage # :nodoc: "#{program_name}" end |