In Files

  • rbs-1.0.4/lib/rbs/types.rb

Class/Module Index [+]

Quicksearch

RBS::Types::ClassInstance

Attributes

location[R]

Public Class Methods

new(name:, args:, location:) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/types.rb, line 272
def initialize(name,, args,, location))
  @name = name
  @args = args
  @location = location
end
            

Public Instance Methods

map_type_name(&block) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/types.rb, line 288
def map_type_name(&block)
  ClassInstance.new(
    name: yield(name, location, self),
    args: args.map {|type| type.map_type_name(&block) },
    location: location
  )
end
            
sub(s) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/types.rb, line 282
def sub(s)
  self.class.new(name: name,
                 args: args.map {|ty| ty.sub(s) },
                 location: location)
end
            
to_json(*a) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/types.rb, line 278
def to_json(*a)
  { class: :class_instance, name: name, args: args, location: location }.to_json(*a)
end