Class: ActiveGraph::Node::Scope::ScopeEvalContext

Inherits:
Object
  • Object
show all
Defined in:
lib/active_graph/node/scope.rb

Instance Method Summary collapse

Constructor Details

#initialize(target, query_proxy) ⇒ ScopeEvalContext

Returns a new instance of ScopeEvalContext.



102
103
104
105
# File 'lib/active_graph/node/scope.rb', line 102

def initialize(target, query_proxy)
  @query_proxy = query_proxy
  @target = target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *params, **kwargs, &block) ⇒ Object

method_missing is not delegated to super class but to aggregated class rubocop:disable Style/MethodMissingSuper



121
122
123
124
125
126
127
# File 'lib/active_graph/node/scope.rb', line 121

def method_missing(name, *params, **kwargs, &block)
  if RUBY_VERSION < '3' && kwargs.empty?
    query_proxy_or_target.public_send(name, *params, &block)
  else
    query_proxy_or_target.public_send(name, *params, **kwargs, &block)
  end
end

Instance Method Details

#identityObject



107
108
109
# File 'lib/active_graph/node/scope.rb', line 107

def identity
  query_proxy_or_target.identity
end