Class: Fixnum
- Inherits:
-
Object
- Object
- Fixnum
- Defined in:
- lib/butler/irc/user.rb
Instance Method Summary collapse
-
#to_user_prefixes ⇒ Object
Return a String containing the user-prefixes for a flagset, e.g.
Instance Method Details
#to_user_prefixes ⇒ Object
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 |