Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
articular / lib / articular / archive_month.rb
Size: Mime:
module Articular
  # Value object for holding a month in history along with article count
  class ArchiveMonth
    attr_reader :date, :count

    def initialize(date:, count:)
      @date  = date
      @count = count
    end

    def to_s
      "#{date.strftime('%B %Y')} (#{count})"
    end

    def ==(other)
      date == other.date && count && other.count
    end
  end
end