Sha256: 921dfe80d22590906c98e238661ecc2bf26d045c4584191c2e94b2b939cf0e81
Contents?: true
Size: 674 Bytes
Versions: 11
Compression:
Stored size: 674 Bytes
Contents
module PushType module Templatable extend ActiveSupport::Concern def template self.class.template_path end def template_args [template, self.class.template_opts.except!(:path)] end module ClassMethods def template(name, opts = {}) @template_name = name @template_opts = opts end def template_name @template_name || self.name.underscore end def template_path File.join template_opts[:path], template_name end def template_opts { path: _ct.base_class.name.demodulize.pluralize.underscore }.merge(@template_opts || {}) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems