Sha256: 6c77a41309360d8f0ebe272bcafaea2d1b4b8881f23eada7f3e8ffaa100a6298

Contents?: true

Size: 358 Bytes

Versions: 7

Compression:

Stored size: 358 Bytes

Contents

# frozen_string_literal: true

require 'date'

Date.class_eval do
  unless method_defined?(:current_month)
    # :nodoc:
    def current_month
      beginning_of_month..end_of_month
    end
  end
end

DateTime.class_eval do
  unless method_defined?(:current_month)
    # :nodoc:
    def current_month
      beginning_of_month..end_of_month
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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