module RBS::Types::Application

Attributes

args[R]
name[R]

Public Instance Methods

==(other) click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 256
def ==(other)
  other.is_a?(self.class) && other.name == name && other.args == args
end
Also aliased as: eql?
each_type(&block) click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 282
def each_type(&block)
  if block
    args.each(&block)
  else
    enum_for :each_type
  end
end
eql?(other)
Alias for: ==
free_variables(set = Set.new) click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 266
def free_variables(set = Set.new)
  set.tap do
    args.each do |arg|
      arg.free_variables(set)
    end
  end
end
has_classish_type?() click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 294
def has_classish_type?
  each_type.any? {|type| type.has_classish_type? }
end
has_self_type?() click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 290
def has_self_type?
  each_type.any? {|type| type.has_self_type? }
end
hash() click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 262
def hash
  name.hash ^ args.hash
end
to_s(level = 0) click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 274
def to_s(level = 0)
  if args.empty?
    name.to_s
  else
    "#{name}[#{args.join(", ")}]"
  end
end
with_nonreturn_void?() click to toggle source
# File rbs-3.4.4/lib/rbs/types.rb, line 298
def with_nonreturn_void?
  each_type.any? do |type|
    if type.is_a?(Bases::Void)
      # `void` in immediate generics parameter is allowed
      false
    else
      type.with_nonreturn_void?
    end
  end
end