Module: Diary::Item::Snippet

Included in:
Page, Post
Defined in:
lib/diary/item/snippet.rb

Instance Method Summary collapse

Instance Method Details

#snippet(name) ⇒ Object



4
5
6
# File 'lib/diary/item/snippet.rb', line 4

def snippet(name)
  ERB.new(Diary::Snippet.new(name.intern).content).result(binding)
end