Sha256: 1760ab1d8b53e73a8a99ccc5981e88f5043bb9e5061d47260deec2958eb4151f

Contents?: true

Size: 303 Bytes

Versions: 1

Compression:

Stored size: 303 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
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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