Class: Yaic::Channel

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Channel

Returns a new instance of Channel.



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

def initialize(name)
  @name = name
  @topic = nil
  @topic_setter = nil
  @topic_time = nil
  @users = {}
  @modes = {}
end

Instance Attribute Details

#modesObject (readonly)

Returns the value of attribute modes.



5
6
7
# File 'lib/yaic/channel.rb', line 5

def modes
  @modes
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/yaic/channel.rb', line 5

def name
  @name
end

#topicObject (readonly)

Returns the value of attribute topic.



5
6
7
# File 'lib/yaic/channel.rb', line 5

def topic
  @topic
end

#topic_setterObject (readonly)

Returns the value of attribute topic_setter.



5
6
7
# File 'lib/yaic/channel.rb', line 5

def topic_setter
  @topic_setter
end

#topic_timeObject (readonly)

Returns the value of attribute topic_time.



5
6
7
# File 'lib/yaic/channel.rb', line 5

def topic_time
  @topic_time
end

#usersObject (readonly)

Returns the value of attribute users.



5
6
7
# File 'lib/yaic/channel.rb', line 5

def users
  @users
end

Instance Method Details

#set_topic(topic, setter = nil, time = nil) ⇒ Object



16
17
18
19
20
# File 'lib/yaic/channel.rb', line 16

def set_topic(topic, setter = nil, time = nil)
  @topic = topic
  @topic_setter = setter if setter
  @topic_time = time if time
end