Permalink
Browse files

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
  • Loading branch information...
senny committed Jun 24, 2014
1 parent b0594a7 commit b27e856d3f736be34b1df885ce6a795c9a015375
Showing with 35 additions and 36 deletions.
  1. +3 −3 activerecord/lib/active_record/attribute.rb
  2. +2 −2 activerecord/lib/active_record/attribute_decorators.rb
  3. +1 −2 activerecord/lib/active_record/attribute_set.rb
  4. +1 −1 activerecord/lib/active_record/attributes.rb
  5. +2 −2 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  6. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb
  7. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb
  8. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb
  9. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb
  10. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb
  11. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/date.rb
  12. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb
  13. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb
  14. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/enum.rb
  15. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/float.rb
  16. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb
  17. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/inet.rb
  18. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/infinity.rb
  19. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/integer.rb
  20. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/json.rb
  21. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb
  22. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb
  23. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
  24. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb
  25. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/time.rb
  26. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb
  27. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/oid/vector.rb
  28. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
  29. +1 −1 activerecord/lib/active_record/locking/optimistic.rb
  30. +1 −1 activerecord/lib/active_record/type/binary.rb
  31. +1 −1 activerecord/lib/active_record/type/mutable.rb
@@ -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:
@printercu

printercu Dec 22, 2014

Contributor

@senny can we remove :nodoc: here? It took me much time to locate attribute method :(

@matthewd

matthewd Dec 22, 2014

Owner

:nodoc: means this is private/internal; that's why it's excluded from the API docs.

@printercu

printercu Dec 22, 2014

Contributor

So class-level attribute method is private rails method and it can be changed even in patch release? Does it means I should use it very carefully?

@senny

senny Dec 22, 2014

Member

@printercu the Attribute-API is not final yet. We plan to make it public for 5.0. Until then it's advised not to use it because it's semantics can change without notice.

@printercu

printercu Dec 22, 2014

Contributor

@senny got it. Thank you!

# 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

2 comments on commit b27e856

Member

sgrif replied Jun 24, 2014

Ugggggggghhhhh

Member

senny replied Jun 24, 2014

yep 😟

Please sign in to comment.