Class: Wukong::Processor::Flatten

Inherits:
Wukong::Processor show all
Defined in:
lib/wukong/widget/processors.rb

Constant Summary

Constants inherited from Wukong::Processor

SerializerError

Instance Method Summary collapse

Methods inherited from Wukong::Processor

configure, consumes, description, #expected_record_type, #expected_serialization, #finalize, #perform_action, produces, #receive_action, #setup, #stop, valid_serializer?, validate_and_set_serialization

Methods included from Logging

included

Methods included from Hanuman::StageClassMethods

#builder, #label, #register, #set_builder

Instance Method Details

#process(records) ⇒ Object



209
210
211
# File 'lib/wukong/widget/processors.rb', line 209

def process(records)
  records.respond_to?(:each) ? records.each{ |record| yield(record) } : yield(records)
end