Class: Atig::Channel::Channel

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

Direct Known Subclasses

Mention, Retweet, Timeline

Instance Method Summary collapse

Constructor Details

#initialize(context, gateway, db) ⇒ Channel

Returns a new instance of Channel.



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

def initialize(context, gateway, db)
  @db      = db
  @channel = gateway.channel channel_name, :handler=>self
  @channel.join_me

  db.statuses.listen do|entry|
    @channel.topic entry if entry.user.id == db.me.id
  end
end