Class: Graphiti::Scoping::ExtraAttributes
- Defined in:
- lib/graphiti/scoping/extra_attributes.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#apply ⇒ Object
Loop through all requested extra fields.
Methods inherited from Base
#apply?, #apply_custom_scope, #apply_standard_scope, #initialize
Constructor Details
This class inherits a constructor from Graphiti::Scoping::Base
Instance Method Details
#apply ⇒ Object
Loop through all requested extra fields. If custom scoping logic is define for that field, run it. Otherwise, do nothing.
7 8 9 10 11 12 13 |
# File 'lib/graphiti/scoping/extra_attributes.rb', line 7 def apply each_extra_attribute do |callable| @scope = callable.call(@scope, resource.context) end @scope end |