Class: TrueClass

Inherits:
Object show all
Defined in:
lib/hash-utils/boolean.rb

Overview

TrueClass extension.

Since:

  • 0.17.0

Instance Method Summary collapse

Instance Method Details

#boolean?Boolean

Returns:

  • (Boolean)

Since:

  • 0.17.0



21
22
23
# File 'lib/hash-utils/boolean.rb', line 21

def boolean?
    true
end

#convert(t, f) ⇒ Object

Since:

  • 0.17.0



62
63
64
# File 'lib/hash-utils/boolean.rb', line 62

def convert(t, f)
    t
end

#false?Boolean

Returns:

  • (Boolean)

Since:

  • 0.17.0



34
35
36
# File 'lib/hash-utils/boolean.rb', line 34

def false?
    false
end

#to_i(t = 1, f = 0) ⇒ Object

Since:

  • 0.17.0



77
78
79
# File 'lib/hash-utils/boolean.rb', line 77

def to_i(t = 1, f = 0) 
    self.convert(t, f)
end

#true?Boolean

Returns:

  • (Boolean)

Since:

  • 0.17.0



47
48
49
# File 'lib/hash-utils/boolean.rb', line 47

def true?
    true
end