Class: Neetob::CLI::Github::Labels::Update
- Defined in:
- lib/neetob/cli/github/labels/update.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#all_neeto_repos ⇒ Object
Returns the value of attribute all_neeto_repos.
-
#apps ⇒ Object
Returns the value of attribute apps.
-
#new_name ⇒ Object
Returns the value of attribute new_name.
-
#old_name ⇒ Object
Returns the value of attribute old_name.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(apps, old_name, new_name, sandbox = false, all_neeto_repos = false) ⇒ Update
constructor
A new instance of Update.
- #run ⇒ Object
Methods inherited from Base
#check_for_apps_and_all_neeto_repos_option
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(apps, old_name, new_name, sandbox = false, all_neeto_repos = false) ⇒ Update
Returns a new instance of Update.
14 15 16 17 18 19 20 21 |
# File 'lib/neetob/cli/github/labels/update.rb', line 14 def initialize(apps, old_name, new_name, sandbox = false, all_neeto_repos = false) super() @apps = apps @sandbox = sandbox @old_name = old_name @new_name = new_name @all_neeto_repos = all_neeto_repos end |
Instance Attribute Details
#all_neeto_repos ⇒ Object
Returns the value of attribute all_neeto_repos.
12 13 14 |
# File 'lib/neetob/cli/github/labels/update.rb', line 12 def all_neeto_repos @all_neeto_repos end |
#apps ⇒ Object
Returns the value of attribute apps.
12 13 14 |
# File 'lib/neetob/cli/github/labels/update.rb', line 12 def apps @apps end |
#new_name ⇒ Object
Returns the value of attribute new_name.
12 13 14 |
# File 'lib/neetob/cli/github/labels/update.rb', line 12 def new_name @new_name end |
#old_name ⇒ Object
Returns the value of attribute old_name.
12 13 14 |
# File 'lib/neetob/cli/github/labels/update.rb', line 12 def old_name @old_name end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
12 13 14 |
# File 'lib/neetob/cli/github/labels/update.rb', line 12 def sandbox @sandbox end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/neetob/cli/github/labels/update.rb', line 23 def run check_for_apps_and_all_neeto_repos_option(apps, all_neeto_repos) matching_apps = find_all_matching_apps(apps, :github, sandbox, false, all_neeto_repos) matching_apps.each do |app| ui.info("\n Updating label for #{app} repo \n") update_label!(app, old_name, new_name) end end |