Sha256: ff2d1caaf9038fb0c47b65c7b9136cb84fff35ba0ed455168abd88abd51e41e9

Contents?: true

Size: 322 Bytes

Versions: 11

Compression:

Stored size: 322 Bytes

Contents

# encoding: utf-8

require "nokogiri"
require "ace/filters/template"

# 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

11 entries across 11 versions & 1 rubygems

Version Path
ace-0.4.9 example/app/posts.rb
ace-0.4.8 example/app/posts.rb
ace-0.4.7 example/app/posts.rb
ace-0.4.6 example/app/posts.rb
ace-0.4.5 example/app/posts.rb
ace-0.4.4 example/app/posts.rb
ace-0.4.3 example/app/posts.rb
ace-0.4.2 example/app/posts.rb
ace-0.4.1 example/app/posts.rb
ace-0.4 example/app/posts.rb
ace-0.3.3 example/app/posts.rb