Class: NilClass
Overview
These, as well as the methods above are for displaying these numbers in the UI. I prefer these cleaner methods to the decorator pattern (in these few use-cases), because it is really really clean.
Instance Method Summary collapse
-
#hours ⇒ Object
Returns ‘0 hr.’.
-
#money ⇒ Object
Returns ‘$0’.
-
#prettify ⇒ Object
Returns 0.
-
#to_b ⇒ Object
Returns False.
-
#true? ⇒ Boolean
Returns False.
Instance Method Details
#hours ⇒ Object
Returns ‘0 hr.’
10 11 12 |
# File 'lib/jeweler/utils/core_ext/NilClass.rb', line 10 def hours return '0 hr.' end |
#money ⇒ Object
Returns ‘$0’
15 16 17 |
# File 'lib/jeweler/utils/core_ext/NilClass.rb', line 15 def money return '$0' end |
#prettify ⇒ Object
Returns 0
5 6 7 |
# File 'lib/jeweler/utils/core_ext/NilClass.rb', line 5 def prettify return 0 end |
#to_b ⇒ Object
Returns False
25 26 27 |
# File 'lib/jeweler/utils/core_ext/NilClass.rb', line 25 def to_b return false end |
#true? ⇒ Boolean
Returns False
20 21 22 |
# File 'lib/jeweler/utils/core_ext/NilClass.rb', line 20 def true? return false end |