lib/sql_tagger.rb
# Callback that includes SqlTagger::Initializer and does method aliasing.
#
# @param base [Module]
Callback that includes SqlTagger::Initializer and does method aliasing.
Callback that includes SqlTagger :: Initializer and does method aliasing .
def included(base)
      base.send(:include, SqlTagger::Initializer)
      self.instance_methods.map(&:to_s).grep(/_with_sql_tagger$/).each do |with_method|
        target = with_method.sub(/_with_sql_tagger$/, '')
        if base.method_defined?(target)
          base.send(:alias_method, "#{target}_without_sql_tagger", target)
          base.send(:alias_method, target, with_method)
        end
      end
    end
def included ( base ) base . send ( :include , SqlTagger :: Initializer ) self . instance_methods . map ( & :to_s ) . grep ( / _with_sql_tagger$ / ) . each do | with_method | target = with_method . sub ( / _with_sql_tagger$ / , '' ) if base . method_defined? ( target ) base . send ( :alias_method , "#{target}_without_sql_tagger" , target ) base . send ( :alias_method , target , with_method ) end end end
Callback that includes SqlTagger::Initializer and does method aliasing.
Callback that includes SqlTagger :: Initializer and does method aliasing .
base
None