aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb
blob: 507c3a62b0b1f90ef4439d3f2278f520e5810b73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module ActiveRecord
  module ConnectionAdapters
    module PostgreSQL
      module OID # :nodoc:
        class Cidr < Type::Value
          def type
            :cidr
          end

          def cast_value(value)
            ConnectionAdapters::PostgreSQLColumn.string_to_cidr value
          end
        end
      end
    end
  end
end