Sha256: 27f6b37ce81a4e08d93bb89e762ebc89e641041f4d73000ba3f10b06bfc01d11
Contents?: true
Size: 924 Bytes
Versions: 15
Compression:
Stored size: 924 Bytes
Contents
module Pacer::Pipes class PropertyComparisonFilterPipe < RubyPipe def initialize(left, right, filter) super() @filter = filter @left = left.to_s @right = right.to_s end protected def processNextStart while true obj = @starts.next l = obj.getProperty(@left) r = obj.getProperty(@right) case @filter when FilterPipe::Filter::EQUAL return obj if l == r when FilterPipe::Filter::NOT_EQUAL return obj if l != r when FilterPipe::Filter::GREATER_THAN return obj if l and r and l > r when FilterPipe::Filter::LESS_THAN return obj if l and r and l < r when FilterPipe::Filter::GREATER_THAN_EQUAL return obj if l and r and l >= r when FilterPipe::Filter::LESS_THAN_EQUAL return obj if l and r and l <= r end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems