Debian Codegraph @

core/miku/to_ruby/generic_proc.rb

raw symbols SCIP
1 # frozen_string_literal: true
2
3 module MIKU::ToRuby
4 class GenericProc
5 attr_reader :return_type
6
7 def initialize(return_type)
8 @return_type = return_type
9 end
10
11 def |(other)
12 self.class.new(@return_type.types | other.return_type.types)
13 end
14
15 def to_s
16 "#<Type:Proc -> #{@return_type}>"
17 end
18
19 def inspect
20 to_s
21 end
22 end
23 end