In Files

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

Parent

Methods

Class/Module Index [+]

Quicksearch

RBS::Factory

Public Instance Methods

type_name(string) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/factory.rb, line 3
def type_name(string)
  absolute = string.start_with?("::")

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

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