class NilClass

Public Instance Methods

+(n) click to toggle source
# File lib/heartwood/support/nil_class.rb, line 3
def +(n)
  convert_to_match(n) + n
end
to_bool() click to toggle source
# File lib/heartwood/support/nil_class.rb, line 7
def to_bool
  false
end

Private Instance Methods

convert_to_match(obj) click to toggle source
# File lib/heartwood/support/nil_class.rb, line 13
def convert_to_match(obj)
  return to_s if obj.is_a?(String)
  return to_i if obj.is_a?(Integer)
  to_f
end