Class: Steep::TypeInference::TypeEnvBuilder::Command::ImportGlobalDeclarations

Inherits:
RBSBase
  • Object
show all
Defined in:
lib/steep/type_inference/type_env_builder.rb

Instance Attribute Summary

Attributes inherited from RBSBase

#environment, #factory

Instance Method Summary collapse

Methods inherited from RBSBase

#initialize

Constructor Details

This class inherits a constructor from Steep::TypeInference::TypeEnvBuilder::Command::RBSBase

Instance Method Details

#call(env) ⇒ Object



84
85
86
87
88
89
90
# File 'lib/steep/type_inference/type_env_builder.rb', line 84

def call(env)
  global_types = environment.global_decls.transform_values do |decl|
    factory.type(decl.decl.type)
  end

  env.update(global_types: global_types)
end