Sha256: 2ad8c5f8cd80dd56d30588012a6dc215c6c6d9d8dd116f4f630d2db5adfca9dc

Contents?: true

Size: 192 Bytes

Versions: 9

Compression:

Stored size: 192 Bytes

Contents

# frozen_string_literal: true

require 'date'

Date.class_eval do
  unless method_defined?(:month_year)
    # @return [String] - yyyy-mm
    def month_year
      input[0, 7]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby-rails-extensions-1.1.1 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-1.1.1.pre.rc.1 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-0.2.0 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-0.2.0.pre.rc.1 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-1.1.0 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-1.1.0.pre.rc.1 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-0.1.0 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-1.0.0 lib/ruby-rails-extensions/extensions/month_year.rb
ruby-rails-extensions-1.0.0.pre.rc.1 lib/ruby-rails-extensions/extensions/month_year.rb