Sha256: ca3a599393882dd019c2c07fe71cd2a468a915c0fad6b207376ae9ca18ac0b8a

Contents?: true

Size: 313 Bytes

Versions: 1

Compression:

Stored size: 313 Bytes

Contents

# encoding: utf-8

require "nokogiri"
require "ace/filters"

# Inheritted methods:
#   - content
#   - metadata
#   - config
class Post < Ace::Item
  before Ace::TemplateFilter, layout: "post.html"

  def document
    Nokogiri::HTML(self.content)
  end

  def excerpt
    self.document.css("p.excerpt")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ace-0.3.2 example/app/posts.rb