diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-07-22 13:26:43 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-07-22 13:26:43 -0500 |
commit | b7b97fadc183771b129a7b11b7b759f72bfb2dd3 (patch) | |
tree | d54fc2d434d5471680966b2153a079cc7d805e60 /activemodel | |
parent | dad5446a6c6341f4e3f820c5cdde96db9cea0f7c (diff) | |
download | rails-b7b97fadc183771b129a7b11b7b759f72bfb2dd3.tar.gz rails-b7b97fadc183771b129a7b11b7b759f72bfb2dd3.tar.bz2 rails-b7b97fadc183771b129a7b11b7b759f72bfb2dd3.zip |
add :nodoc: directive to AM::ObserverArray internal methods [ci skip]
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/observer_array.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/activemodel/lib/active_model/observer_array.rb b/activemodel/lib/active_model/observer_array.rb index 8de6918d18..2a522e6f18 100644 --- a/activemodel/lib/active_model/observer_array.rb +++ b/activemodel/lib/active_model/observer_array.rb @@ -18,7 +18,7 @@ module ActiveModel # Disables one or more observers. This supports multiple forms: # # ORM.observers.disable :all - # # => disables all observers for all models subclassed from + # # => disables all observers for all models subclassed from # # an ORM base class that includes ActiveModel::Observing # # e.g. ActiveRecord::Base # @@ -43,7 +43,7 @@ module ActiveModel # Enables one or more observers. This supports multiple forms: # # ORM.observers.enable :all - # # => enables all observers for all models subclassed from + # # => enables all observers for all models subclassed from # # an ORM base class that includes ActiveModel::Observing # # e.g. ActiveRecord::Base # @@ -71,11 +71,11 @@ module ActiveModel protected - def disabled_observers + def disabled_observers #:nodoc: @disabled_observers ||= Set.new end - def observer_class_for(observer) + def observer_class_for(observer) #:nodoc: return observer if observer.is_a?(Class) if observer.respond_to?(:to_sym) # string/symbol @@ -86,25 +86,25 @@ module ActiveModel end end - def start_transaction + def start_transaction #:nodoc: disabled_observer_stack.push(disabled_observers.dup) each_subclass_array do |array| array.start_transaction end end - def disabled_observer_stack + def disabled_observer_stack #:nodoc: @disabled_observer_stack ||= [] end - def end_transaction + def end_transaction #:nodoc: @disabled_observers = disabled_observer_stack.pop each_subclass_array do |array| array.end_transaction end end - def transaction + def transaction #:nodoc: start_transaction begin @@ -114,13 +114,13 @@ module ActiveModel end end - def each_subclass_array + def each_subclass_array #:nodoc: model_class.descendants.each do |subclass| yield subclass.observers end end - def set_enablement(enabled, observers) + def set_enablement(enabled, observers) #:nodoc: if block_given? transaction do set_enablement(enabled, observers) |