class Moft::Tags::PostComparer

Constants

MATCHER

Attributes

date[RW]
slug[RW]

Public Class Methods

new(name) click to toggle source
# File lib/moft/tags/post_url.rb, line 8
def initialize(name)
  who, cares, date, slug = *name.match(MATCHER)
  @slug = slug
  @date = Time.parse(date)
end

Public Instance Methods

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