Class: Badges::BuildService

Inherits:
BaseService show all
Defined in:
app/services/badges/build_service.rb

Instance Method Summary collapse

Instance Method Details

#execute(source) ⇒ Object

returns the created badge



6
7
8
9
10
11
12
# File 'app/services/badges/build_service.rb', line 6

def execute(source)
  if source.is_a?(Group)
    GroupBadge.new(params.merge(group: source))
  else
    ProjectBadge.new(params.merge(project: source))
  end
end