提交 21e5fd4a 编写于 作者: A Akira Matsuda

Describe what we are protecting

上级 be984f02
......@@ -133,6 +133,8 @@ def on_close(reason, code) # :nodoc:
send_async :handle_close
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
# The request that initiated the WebSocket connection is available here. This gives access to the environment, cookies, etc.
def request
......
......@@ -28,6 +28,8 @@ def process!
receive_buffered_messages
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :connection
attr_reader :buffered_messages
......
......@@ -61,6 +61,8 @@ def unsubscribe_from_all
subscriptions.each { |id, channel| remove_subscription(channel) }
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :connection, :subscriptions
......
......@@ -32,6 +32,8 @@ def rack_response
websocket.rack_response
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :websocket
end
......
......@@ -278,6 +278,8 @@ def html?
def all?; false; end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :string, :synonyms
......
......@@ -14,6 +14,8 @@ def translate
translated_attribute || human_attribute_name
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :object_name, :method_and_value, :scope, :model
......
......@@ -29,6 +29,8 @@ def serialize(value)
result
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :range
......
......@@ -21,6 +21,8 @@ def lookup(symbol, *args)
end
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :registrations
......@@ -55,6 +57,8 @@ def matches?(type_name, *args, **kwargs)
type_name == name
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :name, :block
......
......@@ -56,6 +56,8 @@ def define_on(klass)
klass.send(:attr_writer, *attr_writers)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :attributes
......
......@@ -16,6 +16,8 @@ def broken_attribute=(value)
raise ErrorFromAttributeWriter
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_writer :metadata
......
......@@ -49,6 +49,8 @@ def self.get_bind_values(owner, chain)
binds
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :value_transformation
......
......@@ -128,6 +128,8 @@ def encode_with(coder)
coder["value"] = value if defined?(@value)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :original_attribute
......
......@@ -20,6 +20,8 @@ def with_type(type)
self.class.new(name, user_provided_value, type, original_attribute)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :user_provided_value
......
......@@ -60,6 +60,8 @@ def force_change(attr_name)
forced_changes << attr_name.to_s
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :attributes, :forced_changes
......
......@@ -98,6 +98,8 @@ def ==(other)
attributes == other.attributes
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :attributes
......
......@@ -90,6 +90,8 @@ def marshal_load(delegate_hash)
@materialized = true
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :types, :values, :additional_types, :delegate_hash, :default
......
......@@ -31,6 +31,8 @@ def decode(coder)
end
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :default_types
......
......@@ -100,6 +100,8 @@ def add_to(table)
end
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :name, :polymorphic, :index, :foreign_key, :type, :options
......
......@@ -41,6 +41,8 @@ def hex?
/\A[0-9A-F]*\Z/i.match?(value)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :value
......
......@@ -140,6 +140,8 @@ def assert_valid_value(value)
end
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :name, :mapping, :subtype
......
......@@ -6,6 +6,8 @@ module Railties # :nodoc:
module ControllerRuntime #:nodoc:
extend ActiveSupport::Concern
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_internal :db_runtime
......
......@@ -66,6 +66,8 @@ def build(attribute, value)
handler_for(value).call(attribute, value)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :table
......
......@@ -29,6 +29,8 @@ def call(attribute, value)
array_predicates.inject { |composite, predicate| composite.or(predicate) }
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :predicate_builder
......
......@@ -28,6 +28,8 @@ def call(attribute, value)
predicate_builder.build_from_hash(queries)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :predicate_builder
......
......@@ -9,6 +9,8 @@ def call(attribute, value)
predicate_builder.build(attribute, value.id)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :predicate_builder
......
......@@ -10,6 +10,8 @@ def call(attribute, value)
predicate_builder.build(attribute, value.name)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :predicate_builder
......
......@@ -21,6 +21,8 @@ def call(attribute, value)
end
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :predicate_builder
......
......@@ -84,6 +84,8 @@ def self.empty
@empty ||= new([], [])
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :predicates
......
......@@ -27,6 +27,8 @@ def build(opts, other)
WhereClause.new(parts, binds || [])
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :klass, :predicate_builder
......
......@@ -64,6 +64,8 @@ def polymorphic_association?
association && association.polymorphic?
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :klass, :arel_table, :association
......
......@@ -50,6 +50,8 @@ def <=>(other)
priority <=> other.priority
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :name, :block, :adapter, :override
......@@ -110,6 +112,8 @@ def priority
super | 4
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :options, :klass
......
......@@ -12,6 +12,8 @@ def type_cast_for_database(attribute_name, value)
connection.type_cast_from_column(column, value)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :table_name
......
......@@ -11,6 +11,8 @@ def type_cast_for_database(attr_name, value)
type.serialize(value)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :types
......
......@@ -13,6 +13,8 @@ def create_migration_file
migration_template @migration_template, "db/migrate/#{file_name}.rb"
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :migration_action, :join_tables
......
......@@ -52,6 +52,8 @@ def subscribers
@@subscribers ||= []
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :subscriber, :notifier, :namespace
......
......@@ -32,6 +32,8 @@ def js_template(source, destination)
end
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :file_name
......
......@@ -23,6 +23,8 @@ def initialize(*args) #:nodoc:
assign_controller_names!(controller_name.pluralize)
end
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
attr_reader :controller_name, :controller_file_name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册