Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Macaddr

Inherits:
Type::String
  • Object
show all
Defined in:
activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#changed?(old_value, new_value, _new_value_before_type_cast) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr.rb', line 12

def changed?(old_value, new_value, _new_value_before_type_cast)
  old_value.class != new_value.class ||
    new_value && old_value.casecmp(new_value) != 0
end

#changed_in_place?(raw_old_value, new_value) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr.rb', line 17

def changed_in_place?(raw_old_value, new_value)
  raw_old_value.class != new_value.class ||
    new_value && raw_old_value.casecmp(new_value) != 0
end

#typeObject



8
9
10
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr.rb', line 8

def type
  :macaddr
end