Class: Numeric

Inherits:
Object show all
Defined in:
lib/shorthand.rb,
lib/shorthand.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


43
# File 'lib/shorthand.rb', line 43

def blank?() false end

#sign(neg = -1,, zer = 0, pos = 1) ⇒ Object



235
# File 'lib/shorthand.rb', line 235

def sign(neg=-1,zer=0,pos=1) self == 0 ? zer : (self < 0 ? neg : pos) end

#sign2(neg = -1,, pos = 1) ⇒ Object



236
# File 'lib/shorthand.rb', line 236

def sign2(neg=-1,pos=1) self < 0 ? neg : pos end

#ssizeObject



237
# File 'lib/shorthand.rb', line 237

def ssize() self.to_s.size end