Sha256: 1261bcd7e5d11e4a433f4e235a5d7bac82aadd892985192e2e31aef74f4e0eb0
Contents?: true
Size: 458 Bytes
Versions: 1
Compression:
Stored size: 458 Bytes
Contents
# frozen_string_literal: true module JMESPath module Nodes class And < Node def initialize(left, right) @left = left @right = right end def visit(value) result = @left.visit(value) if JMESPath::Util.falsey?(result) result else @right.visit(value) end end def optimize self.class.new(@left.optimize, @right.optimize) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jmespath-1.6.2 | lib/jmespath/nodes/and.rb |