class RBS::Types::Alias
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 405 def initialize(name:, args:, location:) @name = name @args = args @location = location end
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 429 def map_type(&block) if block Alias.new( name: name, args: args.map {|type| yield type }, location: location ) else enum_for :map_type end end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 421 def map_type_name(&block) Alias.new( name: yield(name, location, self), args: args.map {|arg| arg.map_type_name(&block) }, location: location ) end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 415 def sub(s) return self if s.empty? Alias.new(name: name, args: args.map {|ty| ty.sub(s) }, location: location) end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/types.rb, line 411 def to_json(state = _ = nil) { class: :alias, name: name, args: args, location: location }.to_json(state) end