Class: Geet::Services::ListLabels

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/geet/services/list_labels.rb

Instance Method Summary collapse

Constructor Details

#initialize(repository, out: $stdout) ⇒ ListLabels

Returns a new instance of ListLabels.



12
13
14
15
# File 'lib/geet/services/list_labels.rb', line 12

def initialize(repository, out: $stdout)
  @repository = repository
  @out = out
end

Instance Method Details

#executeObject



20
21
22
23
24
25
26
# File 'lib/geet/services/list_labels.rb', line 20

def execute
  labels = @repository.labels

  labels.each do |label|
    @out.puts "- #{label.name} (##{label.color})"
  end
end