Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/nio/fmt.rb
Instance Method Summary collapse
Instance Method Details
#even? ⇒ Boolean
1694 1695 1696 |
# File 'lib/nio/fmt.rb', line 1694 def even? self.modulo(2)==0 end |
#odd? ⇒ Boolean
1699 1700 1701 |
# File 'lib/nio/fmt.rb', line 1699 def odd? self.modulo(2)!=0 end |