Class: Numeric

Inherits:
Object show all
Defined in:
lib/reactive_support/core_ext/object/blank.rb

Overview

Ruby’s core Numeric class, the parent class of Integer, Fixnum, Bignum, Float, and Rational. See documentation for version 2.1.3, 2.0.0, or 1.9.3.

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Numbers can never be blank; when called on any Numeric (including Fixnum, Bignum, Float, Integer, and Rational), the #blank? method will return false:

10.blank?     # => false

Returns:

  • (Boolean)


200
201
202
# File 'lib/reactive_support/core_ext/object/blank.rb', line 200

def blank?
  false 
end

#present?Boolean

Numbers are always present; when called on any Numeric (including Fixnum, Bignum, Float, Integer, and Rational), the #present? method will return true:

Math.PI.present?    # => true

Returns:

  • (Boolean)


209
210
211
# File 'lib/reactive_support/core_ext/object/blank.rb', line 209

def present? 
  true 
end