Module: Snippets::Helper

Defined in:
lib/snippets/helper.rb

Instance Method Summary collapse

Instance Method Details

#snippet(slug, options = {}, &block) ⇒ Object



3
4
5
6
# File 'lib/snippets/helper.rb', line 3

def snippet(slug, options = {}, &block)
  text = capture(&block) if block_given?
  Snippet.get(slug, {:text => text}.merge(options))
end