Class: Gem::Commands::CompileCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::CompileCommand
- Defined in:
- lib/rubygems/commands/compile_command.rb
Instance Method Summary collapse
- #arguments ⇒ Object
- #execute ⇒ Object
-
#initialize ⇒ CompileCommand
constructor
A new instance of CompileCommand.
- #usage ⇒ Object
Constructor Details
#initialize ⇒ CompileCommand
Returns a new instance of CompileCommand.
4 5 6 7 |
# File 'lib/rubygems/commands/compile_command.rb', line 4 def initialize super "compile", "Create binary pre-compiled gem", :output => Dir.pwd end |
Instance Method Details
#arguments ⇒ Object
9 10 11 |
# File 'lib/rubygems/commands/compile_command.rb', line 9 def arguments "GEMFILE path to the gem file to compile" end |
#execute ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rubygems/commands/compile_command.rb', line 17 def execute gemfile = [:args].shift # no gem, no binary unless gemfile raise Gem::CommandLineError, "Please specify a gem file on the command line (e.g. #{program_name} foo-0.1.0.gem)" end require "rubygems/compiler" compiler = Gem::Compiler.new(gemfile, ) compiler.compile end |
#usage ⇒ Object
13 14 15 |
# File 'lib/rubygems/commands/compile_command.rb', line 13 def usage "#{program_name} GEMFILE" end |