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 %>
20 21 22 |
# File 'lib/slideshow/helpers/directive_helper.rb', line 20 def css( &block ) content_for( :css, nil, &block ) end |
#slide(params) ⇒ Object
24 25 26 27 28 |
# File 'lib/slideshow/helpers/directive_helper.rb', line 24 def ( params ) # note: to avoid runons with blocks (wrap in double newlines) "\n\n<!-- _S9SLIDE_ #{params ? params : ''} -->\n\n" end |
#style(params) ⇒ Object
30 31 32 33 34 |
# File 'lib/slideshow/helpers/directive_helper.rb', line 30 def style( params ) # note: to avoid runons with blocks (wrap in double newlines) "\n\n<!-- _S9STYLE_ #{params ? params : ''} -->\n\n" end |