Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/butler/irc/user.rb

Instance Method Summary collapse

Instance Method Details

#to_user_prefixesObject

Return a String containing the user-prefixes for a flagset, e.g. (Flags::OP | Flags::Voice).to_user_prefixes # => “@-”



265
266
267
268
269
270
271
# File 'lib/butler/irc/user.rb', line 265

def to_user_prefixes
	result = ""
	Butler::IRC::User::PREFIXES.each { |char, value|
		result += char unless (self & value).zero?
	}
	return result
end