Class: TrueClass

Inherits:
Object show all
Defined in:
lib/corelib_ruby/core_ext/boolean/true.rb

Instance Method Summary collapse

Instance Method Details

#cl_to_boolObject

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(options={})
  options.fetch(:if_yes, "Yes")
end