Sha256: a17894bf306c30a4dc99b6438aa29885fd4443c0461f1c10f6f368899fb6d433

Contents?: true

Size: 321 Bytes

Versions: 2

Compression:

Stored size: 321 Bytes

Contents

require 'rom/mapper_compiler'

module ROM
  module SQL
    class MapperCompiler < ROM::MapperCompiler
      def visit_attribute(node)
        name, _, meta_options = node

        if meta_options[:wrapped]
          [name, from: meta_options[:alias]]
        else
          [name]
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rom-sql-3.0.1 lib/rom/sql/mapper_compiler.rb
rom-sql-3.0.0 lib/rom/sql/mapper_compiler.rb