Module: MustacheRender::RenderAble::ForRecord::ClassMethods
- Defined in:
- lib/mustache_render/ables/render_able.rb
Overview
类方法
Instance Method Summary collapse
-
#load_mustache_populator(*args, &block) ⇒ Object
options: - populators:.
- #mustache_populator_config ⇒ Object
- #mustache_populator_filters_util ⇒ Object
Instance Method Details
#load_mustache_populator(*args, &block) ⇒ Object
options:
- populators:
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/mustache_render/ables/render_able.rb', line 39 def load_mustache_populator *args, &block = ::MustacheRender::ArrayUtil.(args) ( ::MustacheRender::ArrayUtil.init([:populators]).compact ).each do |populator_moule| self.send :include, populator_moule if populator_moule.is_a?(Module) end if block_given? block.call( self.mustache_populator_config ) end end |
#mustache_populator_config ⇒ Object
55 56 57 |
# File 'lib/mustache_render/ables/render_able.rb', line 55 def mustache_populator_config @mustache_populator_config ||= ::MustacheRender::RenderAble::MustachePopulatorConfig.new end |
#mustache_populator_filters_util ⇒ Object
59 60 61 |
# File 'lib/mustache_render/ables/render_able.rb', line 59 def mustache_populator_filters_util self.mustache_populator_config.filters_util end |