Sha256: 141bdc22fcad0b00342c11febd09fe5d833e696046ef04601d57240a0fd48912
Contents?: true
Size: 778 Bytes
Versions: 1
Compression:
Stored size: 778 Bytes
Contents
# rubocop:disable Naming/MethodName # rubocop:disable Naming/UncommunicativeMethodParamName module Arel module Nodes # Postgres: https://www.postgresql.org/docs/9.1/sql-expressions.html class TypeCast < Arel::Nodes::Node attr_reader :arg attr_reader :type_name def initialize(arg, type_name) @arg = arg @type_name = type_name end def ==(other) arg == other.arg && type_name == other.type_name end end end module Visitors class ToSql def visit_Arel_Nodes_TypeCast(o, collector) visit o.arg, collector collector << '::' collector << o.type_name end end end end # rubocop:enable Naming/MethodName # rubocop:enable Naming/UncommunicativeMethodParamName
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arel_toolkit-0.3.0 | lib/arel/extensions/type_cast.rb |