Class: Mogu::GemCommand
- Inherits:
-
Object
- Object
- Mogu::GemCommand
- Defined in:
- lib/mogu/gem_command.rb
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/mogu/gem_command.rb', line 10 def run erb = ERB.new File.read(File.('templates/gem.erb', __dir__.to_s)) template = Tempfile.new gems = ask_gems template.write erb.result_with_hash(gems: gems) template.rewind ENV.store 'LOCATION', template.path Rails::Command.invoke 'app:template' end |