Method: Graphiti::Scope#initialize
- Defined in:
- lib/graphiti/scope.rb
#initialize(object, resource, query, opts = {}) ⇒ Scope
Returns a new instance of Scope.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/graphiti/scope.rb', line 5 def initialize(object, resource, query, opts = {}) @object = object @resource = resource @query = query @opts = opts @object = @resource.around_scoping(@object, @query.hash) { |scope| apply_scoping(scope, opts) } end |