Module: HotDateRails::Utils

Included in:
ActionView::Helpers::FormBuilder
Defined in:
lib/hot_date_rails/utils.rb

Overview

require ‘pry’

Instance Method Summary collapse

Instance Method Details

#deprecate(*dep_mtds, new_mtd) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/hot_date_rails/utils.rb', line 3

def deprecate(*dep_mtds, new_mtd)
  dep_mtds.each do |dep_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
end