Parent

Methods

Files

Class/Module Index [+]

Quicksearch

Jekyll::Tags::PostComparer

Constants

MATCHER

Attributes

date[RW]
slug[RW]

Public Class Methods

new(name) click to toggle source
# File lib/jekyll/tags/post_url.rb, line 8
def initialize(name)
  all, path, date, slug = *name.sub(/^\//, "").match(MATCHER)
  raise ArgumentError.new("'#{name}' does not contain valid date and/or title.") unless all
  @slug = path ? path + slug : slug
  @date = Utils.parse_date(date, "'#{name}' does not contain valid date.")
end

Public Instance Methods

==(other) click to toggle source
# File lib/jekyll/tags/post_url.rb, line 15
def ==(other)
  slug == post_slug(other) &&
    date.year  == other.date.year &&
    date.month == other.date.month &&
    date.day   == other.date.day
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.