Module: PresenterObject::Presentable::ClassMethods
- Defined in:
- lib/presenter_object/presentable.rb
Instance Method Summary collapse
Instance Method Details
#presenter_class ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/presenter_object/presentable.rb', line 16 def presenter_class PresenterObject::Base.presenters.fetch name rescue KeyError if (presenter = PresenterObject.load_presenter!(name)) presenter else raise PresenterNotRegistered, "No presenter registered for #{name}. Is it defined and loaded?" end end |