Class: IRCSupport::Message::Numeric352

Inherits:
Numeric show all
Defined in:
lib/ircsupport/message.rb

Instance Attribute Summary collapse

Attributes inherited from Numeric

#name

Attributes inherited from IRCSupport::Message

#args, #command, #prefix

Instance Method Summary collapse

Methods inherited from Numeric

#is_error?

Methods inherited from IRCSupport::Message

#type

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

#awayBoolean

Returns The away status.

Returns:

  • (Boolean)

    The away status.



164
165
166
# File 'lib/ircsupport/message.rb', line 164

def away
  @away
end

#hopsFixnum

Returns The user’s hop count.

Returns:

  • (Fixnum)

    The user’s hop count.



167
168
169
# File 'lib/ircsupport/message.rb', line 167

def hops
  @hops
end

#hostnameString

Returns The host name.

Returns:

  • (String)

    The host name.



152
153
154
# File 'lib/ircsupport/message.rb', line 152

def hostname
  @hostname
end

#nicknameString

Returns The nickname.

Returns:

  • (String)

    The nickname.



158
159
160
# File 'lib/ircsupport/message.rb', line 158

def nickname
  @nickname
end

#prefixesArray

Returns The user’s prefixes.

Returns:

  • (Array)

    The user’s prefixes.



161
162
163
# File 'lib/ircsupport/message.rb', line 161

def prefixes
  @prefixes
end

#realnameString

Returns The user’s realname.

Returns:

  • (String)

    The user’s realname.



170
171
172
# File 'lib/ircsupport/message.rb', line 170

def realname
  @realname
end

#serverString

Returns The server name.

Returns:

  • (String)

    The server name.



155
156
157
# File 'lib/ircsupport/message.rb', line 155

def server
  @server
end

#targetString

Returns The target of the who reply, either a nickname or a channel name.

Returns:

  • (String)

    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

#usernameString

Returns The username.

Returns:

  • (String)

    The username.



149
150
151
# File 'lib/ircsupport/message.rb', line 149

def username
  @username
end