Class: Irc::Channel::ModeHash
- Inherits:
-
Hash
- Object
- Hash
- Irc::Channel::ModeHash
- Defined in:
- /home/apoc/projects/ruby/rbot/lib/rbot/irc.rb
Overview
Hash of modes. Subclass of Hash that defines any? and all? to check if boolean modes (Type D) are set
Instance Method Summary (collapse)
Instance Method Details
- (Boolean) all?(*ar)
1143 1144 1145 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/irc.rb', line 1143 def all?(*ar) !ar.find { |m| s = m.to_sym ; !(self[s] && self[s].set?) } end |
- (Boolean) any?(*ar)
1140 1141 1142 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/irc.rb', line 1140 def any?(*ar) !!ar.find { |m| s = m.to_sym ; self[s] && self[s].set? } end |