Method: RBS::Namespace.parse

Defined in:
lib/rbs/namespace.rb

.parse(string) ⇒ Object



93
94
95
96
97
98
99
# File 'lib/rbs/namespace.rb', line 93

def self.parse(string)
  if string.start_with?("::")
    new(path: string.split("::").drop(1).map(&:to_sym), absolute: true)
  else
    new(path: string.split("::").map(&:to_sym), absolute: false)
  end
end