class JekyllRecker::Entry

Entry

Public Class Methods

new(doc) click to toggle source
# File lib/jekyll_recker/entry.rb, line 9
def initialize(doc)
  @doc = doc
end

Public Instance Methods

content() click to toggle source
# File lib/jekyll_recker/entry.rb, line 13
def content
  @doc.content
end
date() click to toggle source
# File lib/jekyll_recker/entry.rb, line 17
def date
  @date ||= time_to_date(@doc.date)
end
subtitle() click to toggle source
# File lib/jekyll_recker/entry.rb, line 25
def subtitle
  @doc.data['title']
end
title() click to toggle source
# File lib/jekyll_recker/entry.rb, line 21
def title
  uyd_date(date)
end
url() click to toggle source
# File lib/jekyll_recker/entry.rb, line 29
def url
  @doc.url
end
word_count() click to toggle source
# File lib/jekyll_recker/entry.rb, line 40
def word_count
  @word_count ||= words.size
end
words() click to toggle source
# File lib/jekyll_recker/entry.rb, line 33
def words
  content.split.map do |token|
    token.gsub!(/[^0-9a-z ']/i, '')
    token.downcase
  end
end