circleci
0 of 1967 relevant lines covered (0.0%)
0.0 hits per line
1 |
# frozen_string_literal: true
|
× |
2 |
|
× |
3 |
class FiggyEventProcessor |
× |
4 |
attr_reader :event
|
× |
5 |
def initialize(event) |
× |
6 |
@event = event
|
× |
7 |
end
|
× |
8 |
|
× |
9 |
delegate :process, to: :processor |
× |
10 |
|
× |
11 |
private |
× |
12 |
|
× |
13 |
def event_type |
× |
14 |
event["event"]
|
× |
15 |
end
|
× |
16 |
|
× |
17 |
def processor |
× |
18 |
case event_type
|
× |
19 |
when "CREATED" |
× |
20 |
CreateProcessor.new(event)
|
× |
21 |
when "UPDATED" |
× |
22 |
UpdateProcessor.new(event)
|
× |
23 |
when "DELETED" |
× |
24 |
DeleteProcessor.new(event)
|
× |
25 |
else
|
× |
26 |
UnknownEvent.new(event)
|
× |
27 |
end
|
× |
28 |
end
|
× |
29 |
end
|
× |