Class: Wukong::Processor::Null

Inherits:
Filter show all
Defined in:
lib/wukong/widget/filters.rb

Overview

A widget which doesn't pass any records, i.e. - it acts just like /dev/null.

Examples:

Filter all records on the command line


$ cat input
1
2
3
$ cat input | wu-local null

Filter all records from a dataflow


Wukong.dataflow(:uses_null) do
  ... | null | ...
end

See Also:

Constant Summary

Constants inherited from Wukong::Processor

SerializerError

Instance Method Summary collapse

Methods inherited from Filter

#process, #reject?

Methods inherited from Wukong::Processor

configure, consumes, description, #expected_record_type, #expected_serialization, #finalize, #perform_action, #process, 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

#select?(record) ⇒ Boolean

Prevents any records from passing because it always returns false.

Parameters:

  • record (Object)

Returns:

  • (Boolean)

    false



100
101
102
# File 'lib/wukong/widget/filters.rb', line 100

def select? record
  false
end