Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Xml

Inherits:
Type::String show all
Defined in:
lib/active_record/connection_adapters/postgresql/oid/xml.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Data

Instance Attribute Summary

Attributes inherited from Type::Value

#limit, #precision, #scale

Instance Method Summary collapse

Methods inherited from Type::String

#changed_in_place?, #text?

Methods inherited from Type::Value

#==, #binary?, #changed?, #changed_in_place?, #hash, #initialize, #klass, #number?, #text?, #type_cast_for_schema, #type_cast_from_database, #type_cast_from_user

Constructor Details

This class inherits a constructor from ActiveRecord::Type::Value

Instance Method Details

#typeObject



6
7
8
# File 'lib/active_record/connection_adapters/postgresql/oid/xml.rb', line 6

def type
  :xml
end

#type_cast_for_database(value) ⇒ Object



10
11
12
13
# File 'lib/active_record/connection_adapters/postgresql/oid/xml.rb', line 10

def type_cast_for_database(value)
  return unless value
  Data.new(super)
end