app/models/doc_mailer_maker.rb
# Assigns documentation tasks to a subscription
Assigns documentation tasks to a subscription
Assigns documentation tasks to a subscription
def assign_docs()
    subs.flat_map do |sub|
      if !yield(sub)
        Rails.logger.debug "Filtered: #{sub.inspect}"
        next
      end
      if sub.read?
        sub.unassigned_read_doc_methods.each do |doc|
          @read_docs  << assign_doc_to_subscription(doc, sub)
        end
      end
      if sub.write?
        sub.unassigned_write_doc_methods.each do |doc|
          @write_docs << assign_doc_to_subscription(doc, sub)
        end
      end
    end
  end
def assign_docs ( ) subs . flat_map do | sub | if ! yield ( sub ) Rails . logger . debug "Filtered: #{sub.inspect}" next end if sub . read? sub . unassigned_read_doc_methods . each do | doc | @read_docs << assign_doc_to_subscription ( doc , sub ) end end if sub . write? sub . unassigned_write_doc_methods . each do | doc | @write_docs << assign_doc_to_subscription ( doc , sub ) end end end end
Assigns documentation tasks to a subscription
Assigns documentation tasks to a subscription
# Both +sub.read?+ and +sub.write?+ statements will assign their respective type # to the appropriate subscription queue.