Class: Numeric
Overview
Few helper functions
Instance Method Summary collapse
Instance Method Details
#dec ⇒ Object
173 174 175 |
# File 'lib/core.rb', line 173 def dec - 1 end |
#even? ⇒ Boolean
157 158 159 160 161 162 |
# File 'lib/core.rb', line 157 def even? if self % 2 == 0 return true end return false end |
#inc ⇒ Object
170 171 172 |
# File 'lib/core.rb', line 170 def inc + 1 end |
#to_b ⇒ Object
163 164 165 166 167 168 169 |
# File 'lib/core.rb', line 163 def to_b if self == 0 return false else return true end end |