Class: RailsBootstrapHelpers::Renderers::IconicIconRenderer
- Defined in:
- lib/rails-bootstrap-helpers/renderers/iconic_icon_renderer.rb
Instance Attribute Summary
Attributes inherited from Renderer
Instance Method Summary collapse
-
#initialize(template, icon, options) ⇒ IconicIconRenderer
constructor
A new instance of IconicIconRenderer.
- #render ⇒ Object
Methods inherited from Renderer
Constructor Details
#initialize(template, icon, options) ⇒ IconicIconRenderer
Returns a new instance of IconicIconRenderer.
3 4 5 6 7 |
# File 'lib/rails-bootstrap-helpers/renderers/iconic_icon_renderer.rb', line 3 def initialize (template, icon, ) super template @icon = icon = .dup end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RailsBootstrapHelpers::Renderers::Renderer
Instance Method Details
#render ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails-bootstrap-helpers/renderers/iconic_icon_renderer.rb', line 9 def render icon = ERB::Util.html_escape(@icon.to_s) append_class!(, "iconic-#{icon}") append_style(:color, .delete(:color)) handle_size handle_bs_style handle_action_style content_tag :i, "", () end |