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.



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

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



127
128
129
130
131
132
133
# File 'lib/active_graph/node/scope.rb', line 127

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



113
114
115
# File 'lib/active_graph/node/scope.rb', line 113

def identity
  query_proxy_or_target.identity
end