Class: Gem::Commands::UncompileCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::UncompileCommand
- Includes:
- Gem::CompileMethods, VersionOption
- Defined in:
- lib/rubygems-compile/commands/uncompile_command.rb
Instance Method Summary collapse
-
#arguments ⇒ Object
:nodoc:.
-
#defaults_str ⇒ Object
:nodoc:.
-
#execute ⇒ Object
Determine which gems need to be uncompiled, then create and run an uncompiler object for each of them.
-
#initialize ⇒ UncompileCommand
constructor
A new instance of UncompileCommand.
-
#usage ⇒ Object
:nodoc:.
Methods included from Gem::CompileMethods
Constructor Details
#initialize ⇒ UncompileCommand
Returns a new instance of UncompileCommand.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rubygems-compile/commands/uncompile_command.rb', line 8 def initialize super 'uncompile', 'Uncompile installed gems', ignore: true, all: false add_version_option add_option( '-a', '--all', 'Uncompile all installed gem' ) do |all,opts| opts[:all] = all end add_option( '-I', '--[no-]ignore-dependencies', 'Also uncompile dependencies' ) do |value, | [:ignore] = value end end |
Instance Method Details
#arguments ⇒ Object
:nodoc:
21 22 23 |
# File 'lib/rubygems-compile/commands/uncompile_command.rb', line 21 def arguments # :nodoc: 'GEMNAME name of the gem to uncompile' end |
#defaults_str ⇒ Object
:nodoc:
25 26 27 |
# File 'lib/rubygems-compile/commands/uncompile_command.rb', line 25 def defaults_str # :nodoc: super + '--ignore-dependencies' end |
#execute ⇒ Object
Determine which gems need to be uncompiled, then create and run an uncompiler object for each of them.
37 38 39 40 |
# File 'lib/rubygems-compile/commands/uncompile_command.rb', line 37 def execute require 'rubygems-compile/uncompiler' execution_list.each { |gem| Gem::Uncompiler.uncompile(gem) } end |
#usage ⇒ Object
:nodoc:
29 30 31 |
# File 'lib/rubygems-compile/commands/uncompile_command.rb', line 29 def usage # :nodoc: "#{program_name} GEMNAME [GEMNAME ...]" end |