Class: Yoda::Typing::Inferencer::ParameterBinder::BoundResult
- Inherits:
-
Object
- Object
- Yoda::Typing::Inferencer::ParameterBinder::BoundResult
- Defined in:
- lib/yoda/typing/inferencer/parameter_binder.rb
Instance Attribute Summary collapse
- #generator ⇒ Types::Generator readonly
- #parameter ⇒ Model::Parameters::Base readonly
- #type ⇒ RBS::MethodType readonly
Instance Method Summary collapse
-
#initialize(type:, parameter:, generator:) ⇒ BoundResult
constructor
A new instance of BoundResult.
- #type_binding ⇒ Hash{Symbol => Interface}
Constructor Details
#initialize(type:, parameter:, generator:) ⇒ BoundResult
Returns a new instance of BoundResult.
35 36 37 38 39 |
# File 'lib/yoda/typing/inferencer/parameter_binder.rb', line 35 def initialize(type:, parameter:, generator:) @type = type @parameter = parameter @generator = generator end |
Instance Attribute Details
#generator ⇒ Types::Generator (readonly)
30 31 32 |
# File 'lib/yoda/typing/inferencer/parameter_binder.rb', line 30 def generator @generator end |
#parameter ⇒ Model::Parameters::Base (readonly)
27 28 29 |
# File 'lib/yoda/typing/inferencer/parameter_binder.rb', line 27 def parameter @parameter end |
#type ⇒ RBS::MethodType (readonly)
24 25 26 |
# File 'lib/yoda/typing/inferencer/parameter_binder.rb', line 24 def type @type end |
Instance Method Details
#type_binding ⇒ Hash{Symbol => Interface}
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/yoda/typing/inferencer/parameter_binder.rb', line 42 def type_binding @type_binding ||= begin bind = TypeBinding.new bind_positional_parameters(bind) bind_keyword_parameters(bind) bind_block_parameter(bind) bind end end |