Module: Kombu::Renderable
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- lib/kombu/renderable.rb
Instance Method Summary collapse
- #kombu_component_tag ⇒ Object
- #kombu_javascript_entry_tag ⇒ Object
- #kombu_render_component(component_name, entry_name: nil, mount_element_id: nil, attributes: {}) ⇒ Object
- #kombu_stylesheet_entry_tag ⇒ Object
Instance Method Details
#kombu_component_tag ⇒ Object
24 25 26 27 |
# File 'lib/kombu/renderable.rb', line 24 def kombu_component_tag return "" if @kombu_component.nil? tag(@kombu_component, @kombu_attributes) end |
#kombu_javascript_entry_tag ⇒ Object
29 30 31 32 |
# File 'lib/kombu/renderable.rb', line 29 def kombu_javascript_entry_tag raise_kombu_render_error_not_configured("javascript_entry_tag_proc") if kombu_javascript_entry_tag_proc.nil? instance_exec(&kombu_javascript_entry_tag_proc) end |
#kombu_render_component(component_name, entry_name: nil, mount_element_id: nil, attributes: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/kombu/renderable.rb', line 14 def kombu_render_component(component_name, entry_name: nil, mount_element_id: nil, attributes: {}) @kombu_component = component_name @kombu_attributes = attributes @kombu_entry = entry_name.presence || kombu_default_entry @kombu_mount_element_id = mount_element_id.presence || kombu_default_mount_element_id render kombu_render_option rescue => error raise Kombu::RenderError, error. end |
#kombu_stylesheet_entry_tag ⇒ Object
34 35 36 37 |
# File 'lib/kombu/renderable.rb', line 34 def kombu_stylesheet_entry_tag raise_kombu_render_error_not_configured("stylesheet_entry_tag_proc") if kombu_stylesheet_entry_tag_proc.nil? instance_exec(&kombu_stylesheet_entry_tag_proc) end |