Class: TrueClass

Inherits:
Object show all
Defined in:
lib/core/facets/boolean.rb,
lib/core/facets/object/dup.rb,
lib/core/facets/kernel/blank.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/core/facets/kernel/blank.rb', line 56

def blank?
  false
end

#clone?Boolean

Returns:

  • (Boolean)


56
# File 'lib/core/facets/object/dup.rb', line 56

def clone? ; false ; end

#dup!Object

Since TrueClass is immutable it cannot be duplicated. For this reason #try_dup returns self.

true.dup!  #=> true


54
# File 'lib/core/facets/object/dup.rb', line 54

def dup!   ; self  ; end

#dup?Boolean

Returns:

  • (Boolean)


55
# File 'lib/core/facets/object/dup.rb', line 55

def dup?   ; false ; end

#to_boolObject



39
40
41
# File 'lib/core/facets/boolean.rb', line 39

def to_bool
  self
end