Class: NilClass

Inherits:
Object
  • Object
show all
Defined in:
waxx/patch.rb

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Nil is empty

Returns:

  • (Boolean)


74
75
76
# File 'waxx/patch.rb', line 74

def empty?
  true
end

#f(size = 2, zero_as = "", t = ",", d = ".") ⇒ Object

Format nil as and empty string (2nd param) This is mostly for nil values out of the database that have a format f() called on them.



65
66
67
# File 'waxx/patch.rb', line 65

def f(size=2, zero_as="", t=",", d=".")
  zero_as
end

#hObject

HTML format



59
60
61
# File 'waxx/patch.rb', line 59

def h
  ""
end

#to_symObject

Convert a nil to an empty symbol



70
71
72
# File 'waxx/patch.rb', line 70

def to_sym
  "".to_sym
end