Module: RenderKit::RenderableRegistry
- Defined in:
- lib/render_kit/renderable_registry.rb
Overview
:nodoc:
Class Method Summary collapse
- .get_renderables(path, controller = false) ⇒ Object
- .set_renderable(path, renderable_klass, controller_render = false) ⇒ Object
Class Method Details
.get_renderables(path, controller = false) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/render_kit/renderable_registry.rb', line 7 def self.get_renderables(path, controller=false) if controller renderable = @renderables[path] renderable[:renderable_klass] if renderable&.[](:controller_render) else @renderables[path][:renderable_klass] end end |
.set_renderable(path, renderable_klass, controller_render = false) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/render_kit/renderable_registry.rb', line 16 def self.set_renderable(path, renderable_klass, controller_render=false) @renderables[path] = { renderable_klass: renderable_klass, controller_render: controller_render } end |