Class: TrueClass
- Inherits:
-
Object
- Object
- TrueClass
- Defined in:
- waxx/patch.rb
Instance Method Summary collapse
-
#f(format = :yn) ⇒ Object
Format to a selected format (see FalseClass also) Format Options: yn: Yes tf: True icon: glyphicon (Bootstrap) num: 1.
- #h ⇒ Object
-
#to_i ⇒ Object
Show true as 1.
Instance Method Details
#f(format = :yn) ⇒ Object
Format to a selected format (see FalseClass also)
Format Options:
yn: Yes
tf: True
icon: glyphicon (Bootstrap)
num: 1
131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'waxx/patch.rb', line 131 def f(format=:yn) case format.to_sym when :text "True" when :icon '<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>' when :num "1" else raise "Unknown format in TrueClass.f: #{format}. Needs to be :yn, :tf, :icon, or :num." end end |
#h ⇒ Object
122 123 124 |
# File 'waxx/patch.rb', line 122 def h "true" end |
#to_i ⇒ Object
Show true as 1
145 146 147 |
# File 'waxx/patch.rb', line 145 def to_i 1 end |