Method: ActiveInteractor::Interactor::Context::ClassMethods#contextualize_with
- Defined in:
- lib/active_interactor/interactor/context.rb
#contextualize_with(klass) ⇒ Const
Set the interactor class' context class
212 213 214 215 216 217 218 219 |
# File 'lib/active_interactor/interactor/context.rb', line 212 def contextualize_with(klass) @context_class = begin context_class = klass.to_s.camelize.safe_constantize raise(ActiveInteractor::Error::InvalidContextClass, klass) unless context_class context_class end end |