Class: Literal::Types::DescendantType
- Inherits:
-
Literal::Type
- Object
- Literal::Type
- Literal::Types::DescendantType
- Defined in:
- lib/literal/types/descendant_type.rb
Instance Method Summary collapse
-
#===(value) ⇒ Object
-
#initialize(type) ⇒ DescendantType
constructor
A new instance of DescendantType.
-
#inspect ⇒ Object
Methods included from Modifiers
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 |
#inspect ⇒ Object
8 |
# File 'lib/literal/types/descendant_type.rb', line 8 def inspect = "_Descendant(#{@type})" |