Class: Yoda::Model::FunctionSignatures::Wrapper
- Inherits:
-
Object
- Object
- Yoda::Model::FunctionSignatures::Wrapper
- Extended by:
- Forwardable
- Defined in:
- lib/yoda/model/function_signatures/wrapper.rb
Overview
Wrap FunctionSignature::Base and allow it access to environment. TODO: Merge this with connected store
Instance Attribute Summary collapse
- #environment ⇒ Environment readonly
- #signature ⇒ FunctionSignature::Base readonly
Instance Method Summary collapse
-
#initialize(environment:, signature:) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #rbs_type ⇒ RBS::MethodType
- #to_s(include_namespace: false) ⇒ Object
- #wrapper(env) ⇒ Object
Constructor Details
#initialize(environment:, signature:) ⇒ Wrapper
Returns a new instance of Wrapper.
21 22 23 24 |
# File 'lib/yoda/model/function_signatures/wrapper.rb', line 21 def initialize(environment:, signature:) @environment = environment @signature = signature end |
Instance Attribute Details
#environment ⇒ Environment (readonly)
12 13 14 |
# File 'lib/yoda/model/function_signatures/wrapper.rb', line 12 def environment @environment end |
#signature ⇒ FunctionSignature::Base (readonly)
15 16 17 |
# File 'lib/yoda/model/function_signatures/wrapper.rb', line 15 def signature @signature end |
Instance Method Details
#rbs_type ⇒ RBS::MethodType
28 29 30 |
# File 'lib/yoda/model/function_signatures/wrapper.rb', line 28 def rbs_type signature.rbs_type(environment) end |
#to_s(include_namespace: false) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/yoda/model/function_signatures/wrapper.rb', line 32 def to_s(include_namespace: false) if include_namespace "#{namespace_path}#{sep}#{name}#{rbs_type.to_s}" else "#{name}#{rbs_type.to_s}" end end |