Sha256: e457603c700a7d88d496dc417803aa6bfde7f4cf7e8faf10e6f2ef6e026dbc3c

Contents?: true

Size: 541 Bytes

Versions: 2

Compression:

Stored size: 541 Bytes

Contents

module Alf
  module Operator::Relational
    class Wrap < Alf::Operator()
      include Operator::Relational, Operator::Transform
  
      signature do |s|
        s.argument :attributes, AttrList, []
        s.argument :as, AttrName, :wrapped
      end
      
      protected 
  
      # (see Operator::Transform#_tuple2tuple)
      def _tuple2tuple(tuple)
        wrapped, others = @attributes.split(tuple)
        others[@as] = wrapped
        others
      end
  
    end # class Wrap
  end # module Operator::Relational
end # module Alf

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-0.10.1 lib/alf/operator/relational/wrap.rb
alf-0.10.0 lib/alf/operator/relational/wrap.rb