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