Class: Literal::Types::TruthyType Private

Inherits:
Object
  • Object
show all
Includes:
Literal::Type
Defined in:
lib/literal/types/truthy_type.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

Instance =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

new.freeze

Instance Method Summary collapse

Instance Method Details

#===(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
# File 'lib/literal/types/truthy_type.rb', line 12

def ===(value)
	!!value
end

#>=(other) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
19
20
21
22
23
# File 'lib/literal/types/truthy_type.rb', line 16

def >=(other)
	case other
	when Literal::Types::TruthyType, true
		true
	else
		false
	end
end

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/literal/types/truthy_type.rb', line 8

def inspect
	"_Truthy"
end