Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/botemon/string.rb
Overview
-- Copyright(C) 2013 Giovanni Capuano [email protected]
This file is part of Botémon.
Botémon is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Botémon is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Botémon. If not, see http://www.gnu.org/licenses/. ++
Instance Method Summary collapse
Instance Method Details
#numeric? ⇒ Boolean
22 23 24 |
# File 'lib/botemon/string.rb', line 22 def numeric? self.to_i.to_s == self || self.to_f.to_s == self end |
#oper?(c) ⇒ Boolean
26 27 28 |
# File 'lib/botemon/string.rb', line 26 def oper?(c) bot.channels.each { |c| return true if c.ops.include? self } end |