Class: Fixnum
Instance Method Summary collapse
Instance Method Details
#numeric? ⇒ Boolean
245 |
# File 'lib/shorthand.rb', line 245 def numeric?() true end |
#s(p = 0, ch = '0') ⇒ Object
246 247 248 249 |
# File 'lib/shorthand.rb', line 246 def s(p=0,ch='0') return ch if self == 0 && !ch.nil? p > 0 ? ("%.#{p}f" % self) : self.to_s end |