Sha256: a94f084ca1e056ef0463cd85d484e47d0269c72f24db5a86ce76af78c20084d9
Contents?: true
Size: 586 Bytes
Versions: 10
Compression:
Stored size: 586 Bytes
Contents
module PushType module Presentable extend ActiveSupport::Concern def presenter_class self.class.presenter_class end def present!(context = nil) presenter_class.new(self, context) end module ClassMethods def presenter_class_name "#{ self.name.demodulize }Presenter" end def presenter_class unless Object.const_defined?(presenter_class_name) Object.const_set presenter_class_name, Class.new(PushType::Presenter) end Object.const_get presenter_class_name end end end end
Version data entries
10 entries across 10 versions & 1 rubygems