Class: Neetob::CLI::Github::Labels::Show
- Defined in:
- lib/neetob/cli/github/labels/show.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#label_name ⇒ Object
Returns the value of attribute label_name.
-
#repos ⇒ Object
Returns the value of attribute repos.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(repos, label_name, sandbox = false) ⇒ Show
constructor
A new instance of Show.
- #run ⇒ Object
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(repos, label_name, sandbox = false) ⇒ Show
Returns a new instance of Show.
14 15 16 17 18 19 |
# File 'lib/neetob/cli/github/labels/show.rb', line 14 def initialize(repos, label_name, sandbox = false) super() @repos = repos @label_name = label_name @sandbox = sandbox end |
Instance Attribute Details
#label_name ⇒ Object
Returns the value of attribute label_name.
12 13 14 |
# File 'lib/neetob/cli/github/labels/show.rb', line 12 def label_name @label_name end |
#repos ⇒ Object
Returns the value of attribute repos.
12 13 14 |
# File 'lib/neetob/cli/github/labels/show.rb', line 12 def repos @repos end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
12 13 14 |
# File 'lib/neetob/cli/github/labels/show.rb', line 12 def sandbox @sandbox end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/neetob/cli/github/labels/show.rb', line 21 def run matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox) matching_repos.each do |repo| ui.info("\n \"#{label_name}\" label details from #{repo} \n") begin label_details = client.label(repo, label_name) ui.success(label_details.inspect) rescue StandardError => e ExceptionHandler.new(e).process end end end |