Sha256: 79e19cb6efb8b9760e853813aea7e65a2c4b0e8c207d856ec17db1ce2f37a51f

Contents?: true

Size: 326 Bytes

Versions: 1

Compression:

Stored size: 326 Bytes

Contents

# -*- coding: utf-8 -*-

module Copyrighter
  module Helpers
    def ©(period, joiner = " – ")
      return case period
        when Range then [period.begin, period.end]
        when Time.now.year then [period]
        else [period, Time.now.year]
      end.compact.join(joiner)
    end
    alias :copyright :©
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
copyrighter-1.0.0 lib/copyrighter/helpers.rb