Class: Cangaroo::CountJsonObject

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

Instance Method Summary collapse

Instance Method Details

#callObject



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

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