module RBS::Environment::ContextUtil - rbs: Ruby Standard Library Documentation

# module RBS::Environment::ContextUtil

### Public Instance Methods

calculate_context(decls) click to toggle source

    # File rbs-3.8.0/lib/rbs/environment.rb, line 17
    def calculate_context(decls)
      decls.inject(nil) do |context, decl| #$ Resolver::context
        if (_, last = context)
          last or raise
          [context, last + decl.name]
        else
          [nil, decl.name.absolute!]
        end
      end
    end