Class: FalseClass

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

Instance Method Summary collapse

Instance Method Details

#f(format = :yn) ⇒ Object

Format to a selected format (see TrueClass also)

Format Options:
  yn: No
  tf: False
  icon: glyphicon (Bootstrap)
  num: 0


31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'waxx/patch.rb', line 31

def f(format=:yn)
  case format.to_sym
    when :yn
      "No"
    when :tf
      "False"
    when :icon
      '<span class="glyphicon glyphicon-minus" aria-hidden="true"></span>'
    when :num
      "0"
    else
      raise "Unknown format in FalseClass.f: #{format}. Needs to be :yn, :tf, :icon, or :num."
  end
end

#hObject

HTML format “false”



22
23
24
# File 'waxx/patch.rb', line 22

def h
  "false"
end

#to_iObject

Show false as zero



46
47
48
# File 'waxx/patch.rb', line 46

def to_i
  0
end