class Ping::Mention
Constants
- PATTERN
Attributes
username[RW]
Public Class Methods
extract(text)
click to toggle source
# File lib/ping/mention.rb, line 23 def self.extract(text) text.scan(PATTERN).flatten .map(&:downcase).uniq.map do |username| new(username) end end
new(username)
click to toggle source
# File lib/ping/mention.rb, line 19 def initialize(username) @username = username end
Public Instance Methods
==(other)
click to toggle source
# File lib/ping/mention.rb, line 30 def ==(other) other == username end
to_s()
click to toggle source
# File lib/ping/mention.rb, line 34 def to_s username end