Class: Atig::Channel::Mention

Inherits:
Channel
  • Object
show all
Defined in:
lib/atig/channel/mention.rb

Instance Method Summary collapse

Constructor Details

#initialize(context, gateway, db) ⇒ Mention

Returns a new instance of Mention.



7
8
9
10
11
12
13
14
15
# File 'lib/atig/channel/mention.rb', line 7

def initialize(context, gateway, db)
  super

  db.statuses.listen do|entry|
    if entry.status.text.include?("@#{db.me.screen_name}")
      @channel.message(entry)
    end
  end
end

Instance Method Details

#channel_nameObject



17
# File 'lib/atig/channel/mention.rb', line 17

def channel_name; "#mention" end