Sha256: f192d3ca37d32b45a59f186967315c47f19e1f79ad47b05e4ec727ef2b70b95d

Contents?: true

Size: 696 Bytes

Versions: 5

Compression:

Stored size: 696 Bytes

Contents

module Alf
  module Algebra
    class Rename
      include Operator
      include Relational
      include Unary

      signature do |s|
        s.argument :renaming, Renaming, {}
      end

      def heading
        @heading ||= operand.heading.rename(renaming)
      end

      def keys
        @keys ||= operand.keys.rename(renaming)
      end

      def complete_renaming
        renaming.complete(operand.heading.to_attr_list)
      end

    private

      def _type_check(options)
        no_unknown!(renaming.to_attr_list - operand.attr_list)
        no_name_clash!(renaming.invert.to_attr_list, operand.attr_list)
      end

    end # class Rename
  end # module Algebra
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-core-0.16.3 lib/alf/algebra/operator/rename.rb
alf-core-0.16.2 lib/alf/algebra/operator/rename.rb
alf-core-0.16.1 lib/alf/algebra/operator/rename.rb
alf-core-0.16.0 lib/alf/algebra/operator/rename.rb
alf-core-0.15.0 lib/alf/algebra/operator/rename.rb