Class: Literal::Types::PredicateType

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

Instance Method Summary collapse

Methods included from Literal::Type

#>=

Constructor Details

#initialize(message:, block:) ⇒ PredicateType

Returns a new instance of PredicateType.



6
7
8
9
10
11
# File 'lib/literal/types/predicate_type.rb', line 6

def initialize(message:, block:)
	@message = message
	@block = block

	freeze
end

Instance Method Details

#===(other) ⇒ Object



17
18
19
# File 'lib/literal/types/predicate_type.rb', line 17

def ===(other)
	@block === other
end

#inspectObject



13
14
15
# File 'lib/literal/types/predicate_type.rb', line 13

def inspect
	%(_Predicate("#{@message}"))
end