123456789_123456789_123456789_123456789_123456789_

Module: RBS::Environment::ContextUtil

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rbs/environment.rb

Instance Method Summary

Instance Method Details

#calculate_context(decls)

[ GitHub ]

  
# File 'lib/rbs/environment.rb', line 14

def calculate_context(decls)
  decls.each.with_object([Namespace.root]) do |decl, array|
    first = array.first or raise
    array.unshift(first + decl.name.to_namespace)
  end
end