Class: Flexo::Events::TopicEvent

Inherits:
Flexo::Event show all
Defined in:
lib/flexo/events/topic.rb

Instance Attribute Summary collapse

Attributes inherited from Flexo::Event

#data, #nickname

Instance Method Summary collapse

Methods inherited from Flexo::Event

#me?

Constructor Details

#initialize(*args) ⇒ TopicEvent

Returns a new instance of TopicEvent.



7
8
9
10
11
# File 'lib/flexo/events/topic.rb', line 7

def initialize(*args)
  super
  @channel = @data.params[0]
  @topic   = @data.string
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



4
5
6
# File 'lib/flexo/events/topic.rb', line 4

def channel
  @channel
end

#topicObject (readonly)

Returns the value of attribute topic.



5
6
7
# File 'lib/flexo/events/topic.rb', line 5

def topic
  @topic
end

Instance Method Details

#cleared?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/flexo/events/topic.rb', line 13

def cleared?
  @topic.empty?
end