Module: InstDataShipper::DataSources::Base::ModuleHelperMethods

Defined in:
lib/inst_data_shipper/data_sources/base.rb

Instance Method Summary collapse

Instance Method Details

#delayed(mthd_sym) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/inst_data_shipper/data_sources/base.rb', line 36

def delayed(mthd_sym)
  mthd = instance_method(mthd_sym)
  pmthd_sym = :"_delayed_#{mthd_sym}"

  alias_method pmthd_sym, mthd_sym
  private pmthd_sym

  define_method(mthd_sym) do |*args, **kwargs|
    delayed(pmthd_sym, *args, **kwargs)
  end
end