Class: Gem::Commands::SpecifyCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::SpecifyCommand
- Defined in:
- lib/gm/rubygems_plugin.rb
Defined Under Namespace
Classes: Proxy
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ SpecifyCommand
constructor
A new instance of SpecifyCommand.
Constructor Details
#initialize ⇒ SpecifyCommand
Returns a new instance of SpecifyCommand.
5 6 7 |
# File 'lib/gm/rubygems_plugin.rb', line 5 def initialize super 'specify', 'Generate a spec file' end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/gm/rubygems_plugin.rb', line 9 def execute code = IO.read('Gmfile') eval(code, binding, 'Gmfile') complete_configuration if spec.validate File.open("#{spec.name}.gemspec", 'w+') { |f| f.write spec.to_ruby } end end |