In Files

  • rbs-1.0.4/lib/rbs/namespace.rb
  • rbs-1.0.4/lib/rbs/type_name.rb

Class/Module Index [+]

Quicksearch

Kernel

Public Instance Methods

Namespace(name) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/namespace.rb, line 117
def Namespace(name)
  RBS::Namespace.parse(name)
end
            
TypeName(string) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/type_name.rb, line 77
def TypeName(string)
  absolute = string.start_with?("::")

  *path, name = string.delete_prefix("::").split("::").map(&:to_sym)
  raise unless name

  RBS::TypeName.new(
    name: name,
    namespace: RBS::Namespace.new(path: path, absolute: absolute)
  )
end