Class: GraphqlDevise::MountMethod::OperationPreparers::ResourceKlassSetter
- Inherits:
-
Object
- Object
- GraphqlDevise::MountMethod::OperationPreparers::ResourceKlassSetter
- Defined in:
- lib/graphql_devise/mount_method/operation_preparers/resource_klass_setter.rb
Instance Method Summary collapse
- #call(operation) ⇒ Object
-
#initialize(klass) ⇒ ResourceKlassSetter
constructor
A new instance of ResourceKlassSetter.
Constructor Details
#initialize(klass) ⇒ ResourceKlassSetter
Returns a new instance of ResourceKlassSetter.
7 8 9 |
# File 'lib/graphql_devise/mount_method/operation_preparers/resource_klass_setter.rb', line 7 def initialize(klass) @klass = klass end |
Instance Method Details
#call(operation) ⇒ Object
11 12 13 14 15 |
# File 'lib/graphql_devise/mount_method/operation_preparers/resource_klass_setter.rb', line 11 def call(operation, **) operation.instance_variable_set(:@resource_klass, @klass) operation end |