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-2.5.1 lib/rbs/factory.rb
rbs-2.5.0 lib/rbs/factory.rb
rbs-2.4.0 lib/rbs/factory.rb
rbs-2.3.2 lib/rbs/factory.rb
rbs-2.3.1 lib/rbs/factory.rb
rbs-2.3.0 lib/rbs/factory.rb
rbs-2.2.2 lib/rbs/factory.rb
rbs-2.2.1 lib/rbs/factory.rb
rbs-2.2.0 lib/rbs/factory.rb
rbs-2.1.0 lib/rbs/factory.rb
rbs-2.0.0 lib/rbs/factory.rb
rbs-2.0.0.pre2 lib/rbs/factory.rb
rbs-2.0.0.pre1 lib/rbs/factory.rb
rbs-1.8.1 lib/rbs/factory.rb
rbs-1.8.0 lib/rbs/factory.rb
rbs-1.7.1 lib/rbs/factory.rb
rbs-1.7.0 lib/rbs/factory.rb
rbs-1.7.0.beta.5 lib/rbs/factory.rb
rbs-1.7.0.beta.4 lib/rbs/factory.rb
rbs-1.7.0.beta.3 lib/rbs/factory.rb