Sha256: 3fa24314a3d2228cdc8fa10b453df4deef53ef42858909e1ea73d5c5b23edd67

Contents?: true

Size: 600 Bytes

Versions: 5

Compression:

Stored size: 600 Bytes

Contents

module Alf
  module Operator
    module NonRelational
      class Defaults
        include NonRelational, Unary

        signature do |s|
          s.argument :defaults, TupleComputation, {}
          s.option   :strict,   Boolean, false, "Restrict to default attributes only?"
        end

        # (see Operator#compile)
        def compile
          op = Engine::Defaults.new(operand, defaults)
          op = Engine::Clip.new(op, defaults.to_attr_list, false) if strict
          op
        end

      end # class Defaults
    end # module NonRelational
  end # module Operator
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 lib/alf/operator/non_relational/defaults.rb
alf-0.12.1 lib/alf/operator/non_relational/defaults.rb
alf-0.12.0 lib/alf/operator/non_relational/defaults.rb
alf-0.11.1 lib/alf/operator/non_relational/defaults.rb
alf-0.11.0 lib/alf/operator/non_relational/defaults.rb