add missing :nodoc:
for recent refactorings. [ci skip]
Adding `# :nodoc:` to the parent `class` / `module` is not going to ignore nested classes or modules. There is a modifier `# :nodoc: all` but sadly the containing class or module will continue to be in the docs. /cc @sgrif
This commit is contained in:
parent
b0594a773d
commit
b27e856d3f
@ -49,19 +49,19 @@ def initialize_dup(other)
|
||||
end
|
||||
end
|
||||
|
||||
class FromDatabase < Attribute
|
||||
class FromDatabase < Attribute # :nodoc:
|
||||
def type_cast(value)
|
||||
type.type_cast_from_database(value)
|
||||
end
|
||||
end
|
||||
|
||||
class FromUser < Attribute
|
||||
class FromUser < Attribute # :nodoc:
|
||||
def type_cast(value)
|
||||
type.type_cast_from_user(value)
|
||||
end
|
||||
end
|
||||
|
||||
class Null
|
||||
class Null # :nodoc:
|
||||
class << self
|
||||
attr_reader :value, :value_before_type_cast, :value_for_database
|
||||
|
||||
|
@ -7,7 +7,7 @@ module AttributeDecorators # :nodoc:
|
||||
self.attribute_type_decorations = TypeDecorator.new
|
||||
end
|
||||
|
||||
module ClassMethods
|
||||
module ClassMethods # :nodoc:
|
||||
def decorate_attribute_type(column_name, decorator_name, &block)
|
||||
matcher = ->(name, _) { name == column_name.to_s }
|
||||
key = "_#{column_name}_#{decorator_name}"
|
||||
@ -32,7 +32,7 @@ def add_user_provided_columns(*)
|
||||
end
|
||||
end
|
||||
|
||||
class TypeDecorator
|
||||
class TypeDecorator # :nodoc:
|
||||
delegate :clear, to: :@decorations
|
||||
|
||||
def initialize(decorations = {})
|
||||
|
@ -30,7 +30,7 @@ def initialize_clone(_)
|
||||
super
|
||||
end
|
||||
|
||||
class Builder
|
||||
class Builder # :nodoc:
|
||||
def initialize(types)
|
||||
@types = types
|
||||
end
|
||||
@ -48,6 +48,5 @@ def build_from_database(values, additional_types = {})
|
||||
protected
|
||||
|
||||
attr_reader :attributes
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -9,7 +9,7 @@ module Attributes # :nodoc:
|
||||
self.user_provided_columns = {}
|
||||
end
|
||||
|
||||
module ClassMethods
|
||||
module ClassMethods # :nodoc:
|
||||
# Defines or overrides a attribute on this model. This allows customization of
|
||||
# Active Record's type casting behavior, as well as adding support for user defined
|
||||
# types.
|
||||
|
@ -263,7 +263,7 @@ def last_inserted_id(result)
|
||||
end
|
||||
|
||||
module Fields # :nodoc:
|
||||
class DateTime < Type::DateTime
|
||||
class DateTime < Type::DateTime # :nodoc:
|
||||
def cast_value(value)
|
||||
if Mysql::Time === value
|
||||
new_time(
|
||||
@ -280,7 +280,7 @@ def cast_value(value)
|
||||
end
|
||||
end
|
||||
|
||||
class Time < Type::Time
|
||||
class Time < Type::Time # :nodoc:
|
||||
def cast_value(value)
|
||||
if Mysql::Time === value
|
||||
new_time(
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Array < Type::Value
|
||||
class Array < Type::Value # :nodoc:
|
||||
include Type::Mutable
|
||||
|
||||
# Loads pg_array_parser if available. String parsing can be
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Bit < Type::Value
|
||||
class Bit < Type::Value # :nodoc:
|
||||
def type
|
||||
:bit
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class BitVarying < OID::Bit
|
||||
class BitVarying < OID::Bit # :nodoc:
|
||||
def type
|
||||
:bit_varying
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Bytea < Type::Binary
|
||||
class Bytea < Type::Binary # :nodoc:
|
||||
def type_cast_from_database(value)
|
||||
return if value.nil?
|
||||
PGconn.unescape_bytea(super)
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Cidr < Type::Value
|
||||
class Cidr < Type::Value # :nodoc:
|
||||
def type
|
||||
:cidr
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Date < Type::Date
|
||||
class Date < Type::Date # :nodoc:
|
||||
include Infinity
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class DateTime < Type::DateTime
|
||||
class DateTime < Type::DateTime # :nodoc:
|
||||
include Infinity
|
||||
|
||||
def cast_value(value)
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Decimal < Type::Decimal
|
||||
class Decimal < Type::Decimal # :nodoc:
|
||||
def infinity(options = {})
|
||||
BigDecimal.new("Infinity") * (options[:negative] ? -1 : 1)
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Enum < Type::Value
|
||||
class Enum < Type::Value # :nodoc:
|
||||
def type
|
||||
:enum
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Float < Type::Float
|
||||
class Float < Type::Float # :nodoc:
|
||||
include Infinity
|
||||
|
||||
def cast_value(value)
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Hstore < Type::Value
|
||||
class Hstore < Type::Value # :nodoc:
|
||||
include Type::Mutable
|
||||
|
||||
def type
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Inet < Cidr
|
||||
class Inet < Cidr # :nodoc:
|
||||
def type
|
||||
:inet
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
module Infinity
|
||||
module Infinity # :nodoc:
|
||||
def infinity(options = {})
|
||||
options[:negative] ? -::Float::INFINITY : ::Float::INFINITY
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Integer < Type::Integer
|
||||
class Integer < Type::Integer # :nodoc:
|
||||
include Infinity
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Json < Type::Value
|
||||
class Json < Type::Value # :nodoc:
|
||||
include Type::Mutable
|
||||
|
||||
def type
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Money < Type::Decimal
|
||||
class Money < Type::Decimal # :nodoc:
|
||||
include Infinity
|
||||
|
||||
class_attribute :precision
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Point < Type::Value
|
||||
class Point < Type::Value # :nodoc:
|
||||
include Type::Mutable
|
||||
|
||||
def type
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Range < Type::Value
|
||||
class Range < Type::Value # :nodoc:
|
||||
attr_reader :subtype, :type
|
||||
|
||||
def initialize(subtype, type)
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class SpecializedString < Type::String
|
||||
class SpecializedString < Type::String # :nodoc:
|
||||
attr_reader :type
|
||||
|
||||
def initialize(type)
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Time < Type::Time
|
||||
class Time < Type::Time # :nodoc:
|
||||
include Infinity
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Uuid < Type::Value
|
||||
class Uuid < Type::Value # :nodoc:
|
||||
def type
|
||||
:uuid
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module PostgreSQL
|
||||
module OID # :nodoc:
|
||||
class Vector < Type::Value
|
||||
class Vector < Type::Value # :nodoc:
|
||||
attr_reader :delim, :subtype
|
||||
|
||||
# +delim+ corresponds to the `typdelim` column in the pg_types
|
||||
|
@ -186,7 +186,7 @@ def array_column(column)
|
||||
end
|
||||
end
|
||||
|
||||
class AdapterProxyType < SimpleDelegator
|
||||
class AdapterProxyType < SimpleDelegator # :nodoc:
|
||||
def initialize(column, adapter)
|
||||
@column = column
|
||||
@adapter = adapter
|
||||
|
@ -170,7 +170,7 @@ def update_counters(id, counters)
|
||||
end
|
||||
end
|
||||
|
||||
class LockingType < SimpleDelegator
|
||||
class LockingType < SimpleDelegator # :nodoc:
|
||||
def type_cast_from_database(value)
|
||||
# `nil` *should* be changed to 0
|
||||
super.to_i
|
||||
|
@ -22,7 +22,7 @@ def type_cast_for_database(value)
|
||||
Data.new(super)
|
||||
end
|
||||
|
||||
class Data
|
||||
class Data # :nodoc:
|
||||
def initialize(value)
|
||||
@value = value
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
module ActiveRecord
|
||||
module Type
|
||||
module Mutable
|
||||
module Mutable # :nodoc:
|
||||
def type_cast_from_user(value)
|
||||
type_cast_from_database(type_cast_for_database(value))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user