Sha256: ab19682aff42a58ac61d1c0f8296530495131a97f9f7c08bfef0812e2a1e8b81

Contents?: true

Size: 338 Bytes

Versions: 1

Compression:

Stored size: 338 Bytes

Contents

module HotDateRails::Utils
	def deprecate(dep_mtd, new_mtd)
		define_method(dep_mtd) do |*args, &block|
			warn "Warning: #{dep_mtd}() is deprecated. In the future please use #{new_mtd}()."
			send(new_mtd, *args, &block)
		end
	end
	def deprecate_consolidated(dep_mtds, new_mtd)
		dep_mtds.each { |mtd| deprecate(mtd, new_mtd) }
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hot_date_rails-1.4.0 lib/hot_date_rails/utils.rb