class Object
Extends Object
with additional helper methods
Public Instance Methods
blank?()
click to toggle source
Adds blank? method to any object Lifted from: github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/object/blank.rb @return [true, false]
# File lib/ext/object.rb, line 6 def blank? # rubocop:disable Style/DoubleNegation respond_to?(:empty?) ? !!empty? : !self # rubocop:enable Style/DoubleNegation end
greater_than_zero?()
click to toggle source
Checks where object is greater than zero Returns false of object is nil @return [true, false]
# File lib/ext/object.rb, line 15 def greater_than_zero? return false if nil? to_i.positive? end