Method: ActiveQuery::SQLTemplate#load!

Defined in:
lib/active_query/sql_template.rb

#load!Object



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/active_query/sql_template.rb', line 21

def load!
	template_path = @config.template_path
	unless File.directory?(template_path) 
		raise TemplatePathError, "error: #{template_path} template path is invalid, please make sure it exists."
	else 
		Find.find(template_path) do |path| 
			if File.basename(path) =~ /sql$/
				parse_sql(path)
			end
		end
	end
end