aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2016-11-01 19:24:07 -0400
committerArthur Neves <arthurnn@gmail.com>2016-11-01 19:24:10 -0400
commit9ebb3558f4bddc2af52829abd2b198bc7fab4a13 (patch)
treeafbdfc469bbdb3a8e3b80d90701ef92972e30195
parent7bb28a0df2c5e31224e094243580a37ca43ccead (diff)
downloadrails-9ebb3558f4bddc2af52829abd2b198bc7fab4a13.tar.gz
rails-9ebb3558f4bddc2af52829abd2b198bc7fab4a13.tar.bz2
rails-9ebb3558f4bddc2af52829abd2b198bc7fab4a13.zip
Make `register_block_for` private
-rw-r--r--railties/lib/rails/railtie.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index f890b1f13a..ae26501741 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -178,17 +178,6 @@ module Rails
ActiveSupport::Inflector.underscore(string).tr("/", "_")
end
- # receives an instance variable identifier, set the variable value if is
- # blank and append given block to value, which will be used later in
- # `#each_registered_block(type, &block)`
- def register_block_for(type, &blk)
- var_name = "@#{type}"
- blocks = instance_variable_get(var_name) || instance_variable_set(var_name, [])
- blocks << blk if blk
- blocks
- end
-
-
# If the class method does not have a method, then send the method call
# to the Railtie instance.
def method_missing(name, *args, &block)
@@ -198,6 +187,17 @@ module Rails
super
end
end
+
+ private
+ # receives an instance variable identifier, set the variable value if is
+ # blank and append given block to value, which will be used later in
+ # `#each_registered_block(type, &block)`
+ def register_block_for(type, &blk)
+ var_name = "@#{type}"
+ blocks = instance_variable_get(var_name) || instance_variable_set(var_name, [])
+ blocks << blk if blk
+ blocks
+ end
end
delegate :railtie_name, to: :class