Class: TrueClass
- Inherits:
-
Object
- Object
- TrueClass
- Defined in:
- lib/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
147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/waxx/patch.rb', line 147 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
138 139 140 |
# File 'lib/waxx/patch.rb', line 138 def h "true" end |
#to_i ⇒ Object
Show true as 1
160 161 162 |
# File 'lib/waxx/patch.rb', line 160 def to_i 1 end |