Class: Michael::Commands::Repos::Edit
- Inherits:
-
Object
- Object
- Michael::Commands::Repos::Edit
- Defined in:
- lib/michael/commands/repos/edit.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(repos_filepath, cfg, editor, options) ⇒ Edit
constructor
A new instance of Edit.
Constructor Details
#initialize(repos_filepath, cfg, editor, options) ⇒ Edit
Returns a new instance of Edit.
7 8 9 10 11 12 13 14 |
# File 'lib/michael/commands/repos/edit.rb', line 7 def initialize(repos_filepath, cfg, editor, ) super() @repos_filepath = repos_filepath @cfg = cfg @editor = editor @options = end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 |
# File 'lib/michael/commands/repos/edit.rb', line 16 def execute list = cfg.fetch(:repos) cfg.append('org/repo', to: :repos) if list.nil? || list.empty? editor.open(repos_filepath) end |