Class: Gemsmith::CLI::Actions::Edit
- Inherits:
-
Sod::Action
- Object
- Sod::Action
- Gemsmith::CLI::Actions::Edit
- Defined in:
- lib/gemsmith/cli/actions/edit.rb
Overview
Handles the edit action for editing an installed gem.
Instance Method Summary collapse
- #call(gem_name) ⇒ Object
-
#initialize(picker: Spek::Picker, editor: Tools::Editor.new) ⇒ Edit
constructor
A new instance of Edit.
Constructor Details
Instance Method Details
#call(gem_name) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/gemsmith/cli/actions/edit.rb', line 25 def call gem_name case picker.call(gem_name).bind { |spec| editor.call spec } in Success(spec) then logger.info { "Editing: #{spec.named_version}." } in Failure() then log_error { } else log_error { "Unable to handle edit action." } end end |