Class: Integer
Instance Method Summary collapse
Instance Method Details
#even? ⇒ Boolean
46 47 48 |
# File 'lib/must_be.rb', line 46 def even? self % 2 == 0 end |
#odd? ⇒ Boolean
38 39 40 |
# File 'lib/must_be.rb', line 38 def odd? self % 2 == 1 end |