class RBS::Types::UntypedFunction
Attributes
return_type[R]
Public Class Methods
new(return_type:)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1208 def initialize(return_type:) @return_type = return_type end
Public Instance Methods
==(other)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1282 def ==(other) other.is_a?(UntypedFunction) && other.return_type == return_type end
Also aliased as: eql?
each_param(&block)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1232 def each_param(&block) if block # noop else enum_for :each_param end end
each_type() { |return_type| ... }
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1224 def each_type(&block) if block yield return_type else enum_for :each_type end end
empty?()
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1258 def empty? true end
free_variables(acc = Set.new)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1212 def free_variables(acc = Set.new) return_type.free_variables(acc) end
has_classish_type?()
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1266 def has_classish_type? return_type.has_classish_type? end
has_self_type?()
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1262 def has_self_type? return_type.has_self_type? end
hash()
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1288 def hash self.class.hash ^ return_type.hash end
map_type() { |return_type| ... }
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1216 def map_type(&block) if block update(return_type: yield(return_type)) else enum_for :map_type end end
param_to_s()
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1274 def param_to_s "?" end
return_to_s()
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1278 def return_to_s return_type.to_s(1) end
sub(subst)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1246 def sub(subst) map_type { _1.sub(subst) } end
to_json(state = _ = nil)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1240 def to_json(state = _ = nil) { return_type: return_type }.to_json(state) end
update(return_type: self.return_type)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1254 def update(return_type: self.return_type) UntypedFunction.new(return_type: return_type) end
with_nonreturn_void?()
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1270 def with_nonreturn_void? false end
with_return_type(ty)
click to toggle source
# File rbs-3.6.1/lib/rbs/types.rb, line 1250 def with_return_type(ty) update(return_type: ty) end