Class: Yaic::Channel
- Inherits:
-
Object
- Object
- Yaic::Channel
- Defined in:
- lib/yaic/channel.rb
Instance Attribute Summary collapse
-
#modes ⇒ Object
readonly
Returns the value of attribute modes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
-
#topic_setter ⇒ Object
readonly
Returns the value of attribute topic_setter.
-
#topic_time ⇒ Object
readonly
Returns the value of attribute topic_time.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
-
#initialize(name) ⇒ Channel
constructor
A new instance of Channel.
- #set_topic(topic, setter = nil, time = nil) ⇒ Object
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
#modes ⇒ Object (readonly)
Returns the value of attribute modes.
5 6 7 |
# File 'lib/yaic/channel.rb', line 5 def modes @modes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/yaic/channel.rb', line 5 def name @name end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
5 6 7 |
# File 'lib/yaic/channel.rb', line 5 def topic @topic end |
#topic_setter ⇒ Object (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_time ⇒ Object (readonly)
Returns the value of attribute topic_time.
5 6 7 |
# File 'lib/yaic/channel.rb', line 5 def topic_time @topic_time end |
#users ⇒ Object (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 |