Module: Juli::Visitor::Html::TagHelper
- Included in:
- Command::RecentUpdate, Command::Sitemap, Command::Tag, Macro::Photo, Juli::Visitor::Html, Helper::Contents::ContentsDrawer, HtmlLine
- Defined in:
- lib/juli/visitor/html/tag_helper.rb
Overview
copied from Rails
Instance Method Summary collapse
- #content_tag(name, content_or_options_with_block = nil, options = nil, &block) ⇒ Object
- #tag(name, options = nil, open = false) ⇒ Object
Instance Method Details
#content_tag(name, content_or_options_with_block = nil, options = nil, &block) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/juli/visitor/html/tag_helper.rb', line 8 def content_tag(name, = nil, = nil, &block) if block_given? = if .is_a?(Hash) content_tag_string(name, block.call, ) else content_tag_string(name, , ) end end |
#tag(name, options = nil, open = false) ⇒ Object
4 5 6 |
# File 'lib/juli/visitor/html/tag_helper.rb', line 4 def tag(name, = nil, open = false) "<#{name}#{() if }#{open ? ">" : " />"}" end |