Class: Michael::Commands::Repos::Edit
- Inherits:
-
Models::Guard
- Object
- Michael::Command
- Models::Guard
- Michael::Commands::Repos::Edit
- Defined in:
- lib/michael/commands/repos/edit.rb
Instance Attribute Summary
Attributes inherited from Models::Guard
Instance Method Summary collapse
- #execute(input: $stdin, output: $stdout) ⇒ Object
-
#initialize(options) ⇒ Edit
constructor
A new instance of Edit.
Methods inherited from Michael::Command
#command, #cursor, #editor, #exec_exist?, #generator, #pager, #pastel, #platform, #prompt, #screen, #spinner, #which
Constructor Details
#initialize(options) ⇒ Edit
10 11 12 13 14 |
# File 'lib/michael/commands/repos/edit.rb', line 10 def initialize() super() = end |
Instance Method Details
#execute(input: $stdin, output: $stdout) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/michael/commands/repos/edit.rb', line 16 def execute(input: $stdin, output: $stdout) list = repos_config.fetch(:repos) repos_config.append('org/repo', to: :repos) if list.nil? || list.empty? editor.open(repos_config.config_file_path) end |