Class: TrueClass
Instance Method Summary collapse
-
#cl_to_bool ⇒ Object
Convert true to true.
-
#cl_to_yes_no(options = {}) ⇒ Object
Convert true to “Yes”.
Instance Method Details
#cl_to_bool ⇒ Object
Convert true to true. This method is added for polymorphism with other cl_to_bool methods.
9 10 11 |
# File 'lib/corelib_ruby/core_ext/boolean/true.rb', line 9 def cl_to_bool self end |
#cl_to_yes_no(options = {}) ⇒ Object
Convert true to “Yes”. This method takes the following optional arguments
if_yes: A different string to show other than "Yes"
4 5 6 |
# File 'lib/corelib_ruby/core_ext/boolean/true.rb', line 4 def cl_to_yes_no(={}) .fetch(:if_yes, "Yes") end |