Sha256: 498d96f2680071146d08145b70b144479aaa3558aba6730f6a3a065ef1994b25
Contents?: true
Size: 520 Bytes
Versions: 12
Compression:
Stored size: 520 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 "#{ name }Presenter" end def presenter_class Object.const_get presenter_class_name rescue NameError Object.const_set presenter_class_name, Class.new(PushType::Presenter) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems