Class: Yoda::Model::Environment::ValueResolveContext::WrappedType
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Yoda::Model::Environment::ValueResolveContext::WrappedType
- Defined in:
- lib/yoda/model/environment/value_resolve_context.rb
Instance Attribute Summary collapse
- #context ⇒ ValueResolveContext readonly
Instance Method Summary collapse
- #act_as_type_wrapper? ⇒ Boolean
-
#initialize(type, context:) ⇒ WrappedType
constructor
A new instance of WrappedType.
- #pretty_print(pp) ⇒ Object
- #propage_context_to(another_type) ⇒ WrappedType
- #wrapped_type ⇒ Object
Constructor Details
#initialize(type, context:) ⇒ WrappedType
Returns a new instance of WrappedType.
31 32 33 34 |
# File 'lib/yoda/model/environment/value_resolve_context.rb', line 31 def initialize(type, context:) @context = context super(type) end |
Instance Attribute Details
#context ⇒ ValueResolveContext (readonly)
27 28 29 |
# File 'lib/yoda/model/environment/value_resolve_context.rb', line 27 def context @context end |
Instance Method Details
#act_as_type_wrapper? ⇒ Boolean
36 37 38 |
# File 'lib/yoda/model/environment/value_resolve_context.rb', line 36 def act_as_type_wrapper? wrapped_type end |
#pretty_print(pp) ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/yoda/model/environment/value_resolve_context.rb', line 51 def pretty_print(pp) pp.object_group(self) do pp.breakable pp.text "type:" pp.pp wrapped_type end end |
#propage_context_to(another_type) ⇒ WrappedType
41 42 43 |
# File 'lib/yoda/model/environment/value_resolve_context.rb', line 41 def propage_context_to(another_type) context.wrap(another_type) end |
#wrapped_type ⇒ Object
46 47 48 |
# File 'lib/yoda/model/environment/value_resolve_context.rb', line 46 def wrapped_type __getobj__ end |