class Michael::Commands::Repos::Edit

Attributes

cfg[R]
editor[R]
repos_filepath[R]

Public Class Methods

new(repos_filepath, cfg, editor, options) click to toggle source
Calls superclass method
# File lib/michael/commands/repos/edit.rb, line 7
def initialize(repos_filepath, cfg, editor, options)
  super()

  @repos_filepath = repos_filepath
  @cfg = cfg
  @editor = editor
  @options = options
end

Public Instance Methods

execute() click to toggle source
# 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