Class: Numeric
- Defined in:
- lib/volt/extra_core/blank.rb,
lib/volt/extra_core/numeric.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#blank? ⇒ Boolean
No number is blank:.
- #in_units_of(unit) ⇒ Object
Instance Method Details
#blank? ⇒ Boolean
No number is blank:
1.blank? # => false
0.blank? # => false
84 85 86 |
# File 'lib/volt/extra_core/blank.rb', line 84 def blank? false end |
#in_units_of(unit) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/volt/extra_core/numeric.rb', line 2 def in_units_of(unit) if self == 1 return "1 #{unit}" else return "#{self} #{unit}s" end end |