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-1.0.2 lib/rbs/factory.rb
rbs-1.0.1 lib/rbs/factory.rb
rbs-1.0.0 lib/rbs/factory.rb
rbs-1.0.0.pre2 lib/rbs/factory.rb
rbs-1.0.0.pre lib/rbs/factory.rb
rbs-0.20.1 lib/rbs/factory.rb
rbs-0.20.0 lib/rbs/factory.rb
rbs-0.19.0 lib/rbs/factory.rb
rbs-0.18.1 lib/rbs/factory.rb
rbs-0.18.0 lib/rbs/factory.rb
rbs-0.17.0 lib/rbs/factory.rb
rbs-0.16.0 lib/rbs/factory.rb
rbs-0.15.0 lib/rbs/factory.rb
rbs-0.14.0 lib/rbs/factory.rb
rbs-0.13.1 lib/rbs/factory.rb
rbs-0.13.0 lib/rbs/factory.rb
rbs-0.12.2 lib/rbs/factory.rb
rbs-0.12.1 lib/rbs/factory.rb
rbs-0.12.0 lib/rbs/factory.rb
rbs-0.11.0 lib/rbs/factory.rb