Class: Geet::Services::ListLabels
- Inherits:
-
Object
- Object
- Geet::Services::ListLabels
- Defined in:
- lib/geet/services/list_labels.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(repository, out: $stdout) ⇒ ListLabels
constructor
A new instance of ListLabels.
Constructor Details
#initialize(repository, out: $stdout) ⇒ ListLabels
Returns a new instance of ListLabels.
6 7 8 9 |
# File 'lib/geet/services/list_labels.rb', line 6 def initialize(repository, out: $stdout) @repository = repository @out = out end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/geet/services/list_labels.rb', line 11 def execute labels = @repository.labels labels.each do |label| @out.puts "- #{label.name} (##{label.color})" end end |