class TypedRb::Types::Type
Attributes
node[RW]
Public Class Methods
new(node)
click to toggle source
# File lib/typed/types.rb, line 37 def initialize(node) @node = node end
Public Instance Methods
compatible?(other_type, relation = :lt)
click to toggle source
other_type is a meta-type not a ruby type
# File lib/typed/types.rb, line 50 def compatible?(other_type, relation = :lt) if other_type.instance_of?(Class) self.instance_of?(other_type) || other_type == TyError else relation = (relation == :lt ? :gt : lt) other_type.instance_of?(self.class, relation) || other_type.instance_of?(TyError) end end
either?()
click to toggle source
# File lib/typed/types.rb, line 45 def either? false end
stack_jump?()
click to toggle source
# File lib/typed/types.rb, line 41 def stack_jump? false end