Class: Yoda::Typing::Contexts::NamespaceBlockContext
- Inherits:
-
BaseContext
- Object
- BaseContext
- Yoda::Typing::Contexts::NamespaceBlockContext
- Defined in:
- lib/yoda/typing/contexts/namespace_block_context.rb
Overview
Block context which has its lexical scope (for instance_eval and instance_exec)
Instance Attribute Summary collapse
Attributes inherited from BaseContext
#constant_ref, #environment, #parent, #receiver, #type_binding
Instance Method Summary collapse
- #current_objects ⇒ Array<Store::Objects::NamespaceObject>
-
#initialize(objects:, **kwargs) ⇒ NamespaceBlockContext
constructor
A new instance of NamespaceBlockContext.
- #parent_variable_scope_context ⇒ Context?
Methods inherited from BaseContext
#constant_resolver, #generator, #lexical_scope_types, #method_receiver, #registry
Methods included from ContextDerivation
#constant_ref, #derive_block_context, #derive_class_context, #derive_method_context, #environment, #receiver
Constructor Details
#initialize(objects:, **kwargs) ⇒ NamespaceBlockContext
Returns a new instance of NamespaceBlockContext.
12 13 14 15 |
# File 'lib/yoda/typing/contexts/namespace_block_context.rb', line 12 def initialize(objects:, **kwargs) @objects = objects super(**kwargs) end |
Instance Attribute Details
#objects ⇒ Store::Objects::NamespaceObject (readonly)
9 10 11 |
# File 'lib/yoda/typing/contexts/namespace_block_context.rb', line 9 def objects @objects end |
Instance Method Details
#current_objects ⇒ Array<Store::Objects::NamespaceObject>
18 19 20 |
# File 'lib/yoda/typing/contexts/namespace_block_context.rb', line 18 def current_objects objects end |
#parent_variable_scope_context ⇒ Context?
23 24 25 |
# File 'lib/yoda/typing/contexts/namespace_block_context.rb', line 23 def parent_variable_scope_context parent end |