Class: RailsBootstrapHelpers::Renderers::ActionLinkRenderer

Inherits:
AbstractLinkRenderer show all
Defined in:
lib/rails-bootstrap-helpers/renderers/action_link_renderer.rb

Instance Attribute Summary

Attributes inherited from Renderer

#template

Instance Method Summary collapse

Methods inherited from Renderer

#method_missing

Constructor Details

#initialize(template, *args, &block) ⇒ ActionLinkRenderer

Returns a new instance of ActionLinkRenderer.



3
4
5
# File 'lib/rails-bootstrap-helpers/renderers/action_link_renderer.rb', line 3

def initialize (template, *args, &block)
  super template, :link, *args, &block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RailsBootstrapHelpers::Renderers::Renderer

Instance Method Details

#renderObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/rails-bootstrap-helpers/renderers/action_link_renderer.rb', line 7

def render
  append_class "act"

  if style = has_option?("style")
    unless style.to_s == "default"
      append_class "act-" + style.to_s
    end
  end

  super
end