Class: FalseClass

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

Instance Method Summary collapse

Instance Method Details

#cl_to_boolObject

Convert false to false. This method is added for polymorphism with other cl_to_bool methods.



9
10
11
# File 'lib/corelib_ruby/core_ext/boolean/false.rb', line 9

def cl_to_bool
  self
end

#cl_to_yes_no(options = {}) ⇒ Object

Convert false to “No”. This method takes the following optional arguments

if_no: A different string to show other than "No"


4
5
6
# File 'lib/corelib_ruby/core_ext/boolean/false.rb', line 4

def cl_to_yes_no(options={})
  options.fetch(:if_no, "No")
end