Module: Slideshow::DirectiveHelper
- Included in:
- Gen
- Defined in:
- lib/slideshow/helpers/directive_helper.rb
Instance Method Summary collapse
-
#css(&block) ⇒ Object
css directive:.
- #slide(params) ⇒ Object
- #style(params) ⇒ Object
Instance Method Details
#css(&block) ⇒ Object
css directive:
lets you use:
%css
-- inline css code here
%end
shortcut for:
%content_for :css
-- inline css code here
%end
or
<% content_for :css do %>
-- inline css code here
<% end %>
22 23 24 |
# File 'lib/slideshow/helpers/directive_helper.rb', line 22 def css( &block ) content_for( :css, nil, &block ) end |
#slide(params) ⇒ Object
26 27 28 29 30 |
# File 'lib/slideshow/helpers/directive_helper.rb', line 26 def ( params ) # note: to avoid runons with blocks (wrap in double newlines) "\n\n<!-- _S9SLIDE_ #{params ? params : ''} -->\n\n" end |
#style(params) ⇒ Object
32 33 34 35 36 |
# File 'lib/slideshow/helpers/directive_helper.rb', line 32 def style( params ) # note: to avoid runons with blocks (wrap in double newlines) "\n\n<!-- _S9STYLE_ #{params ? params : ''} -->\n\n" end |