Class: RailsBootstrapHelpers::Renderers::AbstractButtonRenderer

Inherits:
Renderer
  • Object
show all
Defined in:
lib/rails-bootstrap-helpers/renderers/abstract_button_renderer.rb

Direct Known Subclasses

ButtonRenderer

Instance Attribute Summary

Attributes inherited from Renderer

#template

Instance Method Summary collapse

Methods inherited from Renderer

#method_missing

Constructor Details

#initialize(template, type, *args, &block) ⇒ AbstractButtonRenderer

Returns a new instance of AbstractButtonRenderer.



3
4
5
6
7
8
9
10
11
# File 'lib/rails-bootstrap-helpers/renderers/abstract_button_renderer.rb', line 3

def initialize (template, type, *args, &block)
  super template
  @args = args
  @block = block
  @text = self.args[0]
  @type = type

  extract_options!
end

Dynamic Method Handling

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

Instance Method Details

#renderObject



13
14
15
# File 'lib/rails-bootstrap-helpers/renderers/abstract_button_renderer.rb', line 13

def render
  template.send method, *new_args, &block
end