class Mention::Alert

Public Instance Methods

mentions(account, params = {}) click to toggle source
# File lib/mention/alert.rb, line 22
def mentions(account, params = {})
  account.fetch_mentions(self, params)
end
remove_from(account) click to toggle source
# File lib/mention/alert.rb, line 17
def remove_from(account)
  share = share_for(account)
  account.remove_alert(self, share)
end

Private Instance Methods

share_for(account) click to toggle source
# File lib/mention/alert.rb, line 27
def share_for(account)
  found = shares.find{|share| share.account_id}
  raise Error.new("could not find share for account #{account.id}") if found.nil?
  found
end