Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/nio/fmt.rb
Instance Method Summary collapse
Instance Method Details
#even? ⇒ Boolean
1660 1661 1662 |
# File 'lib/nio/fmt.rb', line 1660 def even? self.modulo(2)==0 end |
#odd? ⇒ Boolean
1665 1666 1667 |
# File 'lib/nio/fmt.rb', line 1665 def odd? self.modulo(2)!=0 end |