Class: Rigor::Scope::ChainKey
- Inherits:
-
Data
- Object
- Data
- Rigor::Scope::ChainKey
- Defined in:
- lib/rigor/scope.rb,
sig/rigor/scope.rbs
Overview
Narrowing key for a no-arg / no-block method-call chain receiver.method_name (a "single-hop" chain per A1
from the ROADMAP ยง Future cycles slice). The value of the map at this key is the narrowed type the next read
of the same chain MUST observe โ typically the post-is_a?(C) narrowing established on a predicate edge.
receiver_kindโ{:local, :ivar}โ the analyzer only tracks chains rooted at a local or instance variable today (Law-of-Demeter-style single-hop).receiver_nameis the root variable's Symbol.method_nameis the no-arg method invoked on the root.
Chains with arguments (x.first(3)), with a block (x.detect { ... }), or with intermediate links
(x.foo.bar) are NOT recorded; each loses stability for different reasons (args / block alter the call's
return; multi-hop loses the LoD guarantee).
Instance Attribute Summary collapse
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#receiver_kind ⇒ Object
readonly
Returns the value of attribute receiver_kind.
-
#receiver_name ⇒ Object
readonly
Returns the value of attribute receiver_name.
Instance Attribute Details
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name
79 80 81 |
# File 'lib/rigor/scope.rb', line 79 def method_name @method_name end |
#receiver_kind ⇒ Object (readonly)
Returns the value of attribute receiver_kind
79 80 81 |
# File 'lib/rigor/scope.rb', line 79 def receiver_kind @receiver_kind end |
#receiver_name ⇒ Object (readonly)
Returns the value of attribute receiver_name
79 80 81 |
# File 'lib/rigor/scope.rb', line 79 def receiver_name @receiver_name end |