Class: Gem::Commands::AutoCompileCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::AutoCompileCommand
- Includes:
- UserInteraction
- Defined in:
- lib/rubygems-compile/commands/autocompile_command.rb
Instance Method Summary collapse
-
#description ⇒ Object
:nodoc:.
- #execute ⇒ Object
-
#initialize ⇒ AutoCompileCommand
constructor
A new instance of AutoCompileCommand.
- #usage ⇒ Object
Constructor Details
#initialize ⇒ AutoCompileCommand
Returns a new instance of AutoCompileCommand.
4 5 6 |
# File 'lib/rubygems-compile/commands/autocompile_command.rb', line 4 def initialize super 'auto_compile', 'Enable gem compilation at install time' end |
Instance Method Details
#description ⇒ Object
:nodoc:
8 9 10 |
# File 'lib/rubygems-compile/commands/autocompile_command.rb', line 8 def description # :nodoc: 'Toggle a setting that enables compiling gems at install time.' end |
#execute ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubygems-compile/commands/autocompile_command.rb', line 16 def execute Gem.configuration[:compile] = if Gem.configuration[:compile] say 'Disabling automatic compilation' false else say 'Enabling automatic compilation' true end Gem.configuration.write end |
#usage ⇒ Object
12 13 14 |
# File 'lib/rubygems-compile/commands/autocompile_command.rb', line 12 def usage "#{progname}" end |