File Manager

Current Path : /usr/lib/ruby/gems/3.0.0/gems/rbs-1.0.4/lib/rbs/
Upload File :
Current File : //usr/lib/ruby/gems/3.0.0/gems/rbs-1.0.4/lib/rbs/factory.rb

module RBS
  class Factory
    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
  end
end

File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com