lib/nelumba-mongodb/activity.rb
def scrape_mentions
      return if self.object.nil?
      return unless !self.object.is_a?(Nelumba::Person) and
                    self.object.respond_to?(:parse_mentions)
      authors = self.object.parse_mentions do |username, domain|
        i = Identity.first(:username => /^#{Regexp.escape(username)}$/i)
        i.person if i
      end
      authors ||= []
      self.mentions_ids = authors.compact.map(&:id)
    end
# Scrape content for username mentions.
Scrape content for username mentions.
Scrape content for username mentions .
def scrape_mentions
      return if self.object.nil?
      return unless !self.object.is_a?(Nelumba::Person) and
                    self.object.respond_to?(:parse_mentions)
      authors = self.object.parse_mentions do |username, domain|
        i = Identity.first(:username => /^#{Regexp.escape(username)}$/i)
        i.person if i
      end
      authors ||= []
      self.mentions_ids = authors.compact.map(&:id)
    end
def scrape_mentions return if self . object . nil? return unless ! self . object . is_a? ( Nelumba :: Person ) and self . object . respond_to? ( :parse_mentions ) authors = self . object . parse_mentions do | username , domain | i = Identity . first ( :username => / ^ #{ Regexp . escape ( username ) } $ /i ) i . person if i end authors ||= [ ] self . mentions_ids = authors . compact . map ( & :id ) end
Scrape content for username mentions.
Scrape content for username mentions .