Class: IRCSupport::Message::Numeric352
- Inherits:
-
Numeric
- Object
- IRCSupport::Message
- Numeric
- IRCSupport::Message::Numeric352
- Defined in:
- lib/ircsupport/message.rb
Instance Attribute Summary collapse
-
#away ⇒ Boolean
The away status.
-
#hops ⇒ Fixnum
The user’s hop count.
-
#hostname ⇒ String
The host name.
-
#nickname ⇒ String
The nickname.
-
#prefixes ⇒ Array
The user’s prefixes.
-
#realname ⇒ String
The user’s realname.
-
#server ⇒ String
The server name.
-
#target ⇒ String
The target of the who reply, either a nickname or a channel name.
-
#username ⇒ String
The username.
Attributes inherited from Numeric
Attributes inherited from IRCSupport::Message
Instance Method Summary collapse
-
#initialize(args) ⇒ Numeric352
constructor
A new instance of Numeric352.
Methods inherited from Numeric
Methods inherited from IRCSupport::Message
Constructor Details
#initialize(args) ⇒ Numeric352
Returns a new instance of Numeric352.
173 174 175 176 177 178 179 180 181 182 |
# File 'lib/ircsupport/message.rb', line 173 def initialize(args) super(args) @target, @username, @hostname, @server, @nickname, status, rest = @args.last(@args.size - 1) status.sub! /[GH]/, '' @away = $1 == 'G' ? true : false @prefixes = status.split '' @hops, @realname = rest.split /\s/, 2 @hops = @hops.to_i end |
Instance Attribute Details
#away ⇒ Boolean
Returns The away status.
164 165 166 |
# File 'lib/ircsupport/message.rb', line 164 def away @away end |
#hops ⇒ Fixnum
Returns The user’s hop count.
167 168 169 |
# File 'lib/ircsupport/message.rb', line 167 def hops @hops end |
#hostname ⇒ String
Returns The host name.
152 153 154 |
# File 'lib/ircsupport/message.rb', line 152 def hostname @hostname end |
#nickname ⇒ String
Returns The nickname.
158 159 160 |
# File 'lib/ircsupport/message.rb', line 158 def nickname @nickname end |
#prefixes ⇒ Array
Returns The user’s prefixes.
161 162 163 |
# File 'lib/ircsupport/message.rb', line 161 def prefixes @prefixes end |
#realname ⇒ String
Returns The user’s realname.
170 171 172 |
# File 'lib/ircsupport/message.rb', line 170 def realname @realname end |
#server ⇒ String
Returns The server name.
155 156 157 |
# File 'lib/ircsupport/message.rb', line 155 def server @server end |
#target ⇒ String
Returns The target of the who reply, either a nickname or a channel name.
146 147 148 |
# File 'lib/ircsupport/message.rb', line 146 def target @target end |
#username ⇒ String
Returns The username.
149 150 151 |
# File 'lib/ircsupport/message.rb', line 149 def username @username end |