Class: Mariner::UnorderedListRenderer::ItemRenderer

Inherits:
Renderer::Base show all
Includes:
ActionView::Helpers::TagHelper
Defined in:
lib/mariner/unordered_list_renderer.rb

Instance Attribute Summary

Attributes inherited from Renderer::Base

#rendering_strategy, #subject

Instance Method Summary collapse

Methods inherited from Renderer::Base

#initialize

Constructor Details

This class inherits a constructor from Mariner::Renderer::Base

Instance Method Details

#renderObject

Public: Renders an A element according to the Url properties.



132
133
134
# File 'lib/mariner/unordered_list_renderer.rb', line 132

def render
   :a, subject.title, render_options
end

#render_optionsObject

Public: The options that the A element will be rendered with. These are forwarded on to ActionView::Helpers::TagHelper#content_tag



139
140
141
142
# File 'lib/mariner/unordered_list_renderer.rb', line 139

def render_options
  opts = { :href => subject.href, :class => subject.name.to_s }
  opts.merge(:class => rendering_strategy.item_classname, &merge_proc).merge(subject.options, &merge_proc)
end