diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-12-19 18:37:57 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-12-24 12:11:06 +0900 |
commit | 53f537d1f83e48aa72ea9ecbf23cc3c7302758a6 (patch) | |
tree | c2374ed7a6f75b9dd8a86573d4216360ebd2b306 /activemodel | |
parent | a43e7706be907e62fad4ffe5f80ab9532c51dbca (diff) | |
download | rails-53f537d1f83e48aa72ea9ecbf23cc3c7302758a6.tar.gz rails-53f537d1f83e48aa72ea9ecbf23cc3c7302758a6.tar.bz2 rails-53f537d1f83e48aa72ea9ecbf23cc3c7302758a6.zip |
No need to :nodoc: private methods
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/attribute_methods.rb | 6 | ||||
-rw-r--r-- | activemodel/lib/active_model/callbacks.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 1441b146f8..f1aff25fe9 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -349,11 +349,11 @@ module ActiveModel # used to alleviate the GC, which ultimately also speeds up the app # significantly (in our case our test suite finishes 10% faster with # this cache). - def attribute_method_matchers_cache #:nodoc: + def attribute_method_matchers_cache @attribute_method_matchers_cache ||= Concurrent::Map.new(initial_capacity: 4) end - def attribute_method_matchers_matching(method_name) #:nodoc: + def attribute_method_matchers_matching(method_name) attribute_method_matchers_cache.compute_if_absent(method_name) do # Must try to match prefixes/suffixes first, or else the matcher with no prefix/suffix # will match every time. @@ -365,7 +365,7 @@ module ActiveModel # Define a method `name` in `mod` that dispatches to `send` # using the given `extra` args. This falls back on `define_method` # and `send` if the given names cannot be compiled. - def define_proxy_call(include_private, mod, name, send, *extra) #:nodoc: + def define_proxy_call(include_private, mod, name, send, *extra) defn = if NAME_COMPILABLE_REGEXP.match?(name) "def #{name}(*args)" else diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb index 283090e380..e99bfab6fd 100644 --- a/activemodel/lib/active_model/callbacks.rb +++ b/activemodel/lib/active_model/callbacks.rb @@ -122,19 +122,19 @@ module ActiveModel private - def _define_before_model_callback(klass, callback) #:nodoc: + def _define_before_model_callback(klass, callback) klass.define_singleton_method("before_#{callback}") do |*args, &block| set_callback(:"#{callback}", :before, *args, &block) end end - def _define_around_model_callback(klass, callback) #:nodoc: + def _define_around_model_callback(klass, callback) klass.define_singleton_method("around_#{callback}") do |*args, &block| set_callback(:"#{callback}", :around, *args, &block) end end - def _define_after_model_callback(klass, callback) #:nodoc: + def _define_after_model_callback(klass, callback) klass.define_singleton_method("after_#{callback}") do |*args, &block| options = args.extract_options! options[:prepend] = true |