Class: Cangaroo::CountJsonObject

Inherits:
Object
  • Object
show all
Includes:
Log, Interactor
Defined in:
app/interactors/cangaroo/count_json_object.rb

Instance Method Summary collapse

Methods included from Log

#log

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
# File 'app/interactors/cangaroo/count_json_object.rb', line 8

def call
  context.object_count = context.data.inject({}) do |o, (k, v)|
    o[k] = v.size
    o
  end

  log.info 'total consumed payloads', count: context.object_count
end