Sha256: c3e6c48603c5a35456f1f498ff274a35239f87025128ce140a0444c465b419a5

Contents?: true

Size: 483 Bytes

Versions: 7

Compression:

Stored size: 483 Bytes

Contents

module Rasti
  module DB
    module NQL
      module Nodes
        class BinaryNode < Treetop::Runtime::SyntaxNode
          
          def dependency_tables
            values.flat_map(&:dependency_tables)
          end

          def values
            @values ||= values_for(left) + values_for(right)
          end

          private

          def values_for(node)
            node.class == self.class ? node.values : [node]
          end

        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rasti-db-2.0.1 lib/rasti/db/nql/nodes/binary_node.rb
rasti-db-2.0.0 lib/rasti/db/nql/nodes/binary_node.rb
rasti-db-1.5.0 lib/rasti/db/nql/nodes/binary_node.rb
rasti-db-1.4.0 lib/rasti/db/nql/nodes/binary_node.rb
rasti-db-1.3.1 lib/rasti/db/nql/nodes/binary_node.rb
rasti-db-1.3.0 lib/rasti/db/nql/nodes/binary_node.rb
rasti-db-1.2.0 lib/rasti/db/nql/nodes/binary_node.rb