Class: Literal::Types::DescendantType

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

Instance Method Summary collapse

Methods included from Modifiers

extended

Constructor Details

#initialize(type) ⇒ DescendantType

Returns a new instance of DescendantType.



4
5
6
# File 'lib/literal/types/descendant_type.rb', line 4

def initialize(type)
	@type = type
end

Instance Method Details

#===(value) ⇒ Object



10
11
12
# File 'lib/literal/types/descendant_type.rb', line 10

def ===(value)
	Module === value && value < @type
end

#inspectObject



8
# File 'lib/literal/types/descendant_type.rb', line 8

def inspect = "_Descendant(#{@type})"