module Wallaby::Servicable::ClassMethods

Configurable attribute

Attributes

model_servicer[R]

@!attribute [r] model_servicer If Wallaby doesn't get it right, please specify the model_servicer. @example To set model servicer

class Admin::ProductionsController < Admin::ApplicationController
  self.model_servicer = ProductServicer
end

@return [Class] model servicer @raise [ArgumentError] when model_servicer doesn't inherit from application_servicer @see Wallaby::ModelServicer @since wallaby-5.2.0

Public Instance Methods

application_servicer() click to toggle source

@!attribute [r] application_servicer The application_servicer is as the base class of {#model_servicer}. @example To set application decorator:

class Admin::ApplicationController < Wallaby::ResourcesController
  self.application_servicer = AnotherApplicationServicer
end

@return [Class] application decorator @raise [ArgumentError] when model_servicer doesn't inherit from application_servicer @see Wallaby::ModelServicer @since wallaby-5.2.0

# File lib/concerns/wallaby/servicable.rb, line 42
def application_servicer
  @application_servicer ||= ModuleUtils.try_to superclass, :application_servicer
end
application_servicer=(application_servicer) click to toggle source

@!attribute [w] application_servicer

# File lib/concerns/wallaby/servicable.rb, line 27
def application_servicer=(application_servicer)
  ModuleUtils.inheritance_check model_servicer, application_servicer
  @application_servicer = application_servicer
end
model_servicer=(model_servicer) click to toggle source

@!attribute [w] model_servicer

# File lib/concerns/wallaby/servicable.rb, line 9
def model_servicer=(model_servicer)
  ModuleUtils.inheritance_check model_servicer, application_servicer
  @model_servicer = model_servicer
end