Permalink
Browse files

add :nodoc: directive to AM::ObserverArray internal methods [ci skip]

  • Loading branch information...
1 parent dad5446 commit b7b97fadc183771b129a7b11b7b759f72bfb2dd3 Francesco Rodriguez committed Jul 22, 2012
Showing with 10 additions and 10 deletions.
  1. +10 −10 activemodel/lib/active_model/observer_array.rb
@@ -18,7 +18,7 @@ def disabled_for?(observer)
# 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 @@ def disable(*observers, &block)
# 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 @@ def enable(*observers, &block)
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 @@ def observer_class_for(observer)
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 @@ def transaction
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)

0 comments on commit b7b97fa

Please sign in to comment.