Class: JsonapiCompliable::Scoping::ExtraFields

Inherits:
Base
  • Object
show all
Defined in:
lib/jsonapi_compliable/scoping/extra_fields.rb

Instance Attribute Summary

Attributes inherited from Base

#query_hash, #resource

Instance Method Summary collapse

Methods inherited from Base

#apply?, #apply_custom_scope, #apply_standard_or_override, #apply_standard_scope, #apply_standard_scope?, #initialize

Constructor Details

This class inherits a constructor from JsonapiCompliable::Scoping::Base

Instance Method Details

#applyObject



3
4
5
6
7
8
9
# File 'lib/jsonapi_compliable/scoping/extra_fields.rb', line 3

def apply
  each_extra_field do |callable|
    @scope = callable.call(@scope)
  end

  @scope
end