module Sequel::Plugins::SqlComments::ClassMethods
Public Instance Methods
sql_comments_class_methods(*meths)
click to toggle source
Use automatic SQL comments for the given class methods.
# File lib/sequel/plugins/sql_comments.rb, line 75 def sql_comments_class_methods(*meths) _sql_comments_methods(singleton_class, :class, meths) end
sql_comments_dataset_methods(*meths)
click to toggle source
Use automatic SQL comments for the given dataset methods.
# File lib/sequel/plugins/sql_comments.rb, line 85 def sql_comments_dataset_methods(*meths) unless @_sql_comments_dataset_module dataset_module(@_sql_comments_dataset_module = Module.new) end _sql_comments_methods(@_sql_comments_dataset_module, :dataset, meths) end
sql_comments_instance_methods(*meths)
click to toggle source
Use automatic SQL comments for the given instance methods.
# File lib/sequel/plugins/sql_comments.rb, line 80 def sql_comments_instance_methods(*meths) _sql_comments_methods(self, :instance, meths) end
Private Instance Methods
_sql_comments_methods(mod, method_type, meths)
click to toggle source
Define automatic SQL comment methods in
mod
for each method in meths
, with the given
method_type
.
# File lib/sequel/plugins/sql_comments.rb, line 113 def _sql_comments_methods(mod, method_type, meths) meths.each do |meth| SqlComments.def_sql_commend_method(mod, self, method_type, meth) end end