Class: Tweetable::Link

Inherits:
Persistable show all
Defined in:
lib/tweetable/link.rb

Direct Known Subclasses

Photo

Constant Summary collapse

URL_PATTERN =
/(http:\S+)/ix

Instance Method Summary collapse

Methods inherited from Persistable

#client, #config, find_or_create, #needs_update?

Instance Method Details

#increment_usage_count(user) ⇒ Object



17
18
19
20
21
# File 'lib/tweetable/link.rb', line 17

def increment_usage_count(user)
  return false if (user.nil? || self.users.include?(user))
  users.add(user)
  self.incr(:count)
end