class RBS::Types::ClassInstance
属性
location[R]
公共类方法
new(name:, args:, location:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 357 def initialize(name:, args:, location:) @name = name @args = args @location = location end
公共实例方法
map_type() { |type| ... } 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 381 def map_type(&block) if block ClassInstance.new( name: name, args: args.map {|type| yield type }, location: location ) else enum_for :map_type end end
map_type_name() { |name, location, self| ... } 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 373 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) 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 367 def sub(s) self.class.new(name: name, args: args.map {|ty| ty.sub(s) }, location: location) end
to_json(state = _ = nil) 点击切换源代码
# File rbs-3.8.0/lib/rbs/types.rb, line 363 def to_json(state = _ = nil) { class: :class_instance, name: name, args: args, location: location }.to_json(state) end