Sha256: 6a01a67badfe1ddb84754b1a21296aa14c910e8cf716898c258982699efc3dea

Contents?: true

Size: 301 Bytes

Versions: 66

Compression:

Stored size: 301 Bytes

Contents

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

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
rbs-0.10.0 lib/rbs/factory.rb
rbs-0.9.1 lib/rbs/factory.rb
rbs-0.9.0 lib/rbs/factory.rb
rbs-0.8.0 lib/rbs/factory.rb
rbs-0.7.0 lib/rbs/factory.rb
rbs-0.6.0 lib/rbs/factory.rb