Class: Mnenv::GemfileCommand
- Inherits:
-
Thor
- Object
- Thor
- Mnenv::GemfileCommand
- Defined in:
- lib/mnenv/commands/gemfile_command.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mnenv/commands/gemfile_command.rb', line 14 def list repo = GemfileRepository.new versions = repo.all case [:format] when 'json' output = JsonFormatter.format_versions(versions) output['platform'] = 'ruby' puts JSON.pretty_generate(output) else list_versions_text(versions, 'Ruby (Gemfile)') end end |
#refresh ⇒ Object
29 30 31 32 |
# File 'lib/mnenv/commands/gemfile_command.rb', line 29 def refresh extractor = Gemfile::Extractor.new(mode: :incremental) extractor.run end |