Module: Literal::Type
- Included in:
- Array::Generic, Failure::Generic, Result::Generic, Success::Generic, Literal::Tuple::Generic, Literal::Types::AnyType, Literal::Types::ArrayType, Literal::Types::BooleanType, Literal::Types::ClassType, Literal::Types::ConstraintType, Literal::Types::DeferredType, Literal::Types::DescendantType, Literal::Types::EnumerableType, Literal::Types::FalsyType, Literal::Types::FrozenType, Literal::Types::HashType, Literal::Types::InterfaceType, Literal::Types::IntersectionType, Literal::Types::JSONDataType, Literal::Types::KindType, Literal::Types::MapType, Literal::Types::NeverType, Literal::Types::NilableType, Literal::Types::NotType, Literal::Types::PredicateType, Literal::Types::RangeType, Literal::Types::SameObjectType, Literal::Types::SetType, Literal::Types::TaggedUnionType, Literal::Types::TruthyType, Literal::Types::TupleType, Literal::Types::UnionType, Literal::Types::VoidType
- Defined in:
- lib/literal/type.rb
Instance Method Summary collapse
Instance Method Details
#<=(other, context: nil) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/literal/type.rb', line 8 def <=(other, context: nil) case other when Literal::Type other.>=(self, context:) else false end end |
#>=(other, context: nil) ⇒ Object
4 5 6 |
# File 'lib/literal/type.rb', line 4 def >=(other, context: nil) self == other end |