Class: TrueClass

Inherits:
Object show all
Defined in:
lib/a_types/core_ext/boolean.rb,
lib/a_types/core_ext/numeric.rb

Overview

Numeric Additions.

Instance Method Summary collapse

Instance Method Details

#to_booltrue Also known as: to_b, to_bool!, to_b!

Returns respecting the Ruby way.

Returns:

  • (true)

    respecting the Ruby way.



84
85
86
# File 'lib/a_types/core_ext/boolean.rb', line 84

def to_bool
  self
end

#to_numObject

Returns 1.

Returns:

  • 1



44
45
46
# File 'lib/a_types/core_ext/numeric.rb', line 44

def to_num
  1
end