Module: ProgramR::AimlFinder
- Defined in:
- lib/programr/utils.rb
Overview
module Cache
Class Method Summary collapse
-
.find(files_and_dirs) ⇒ Object
Returns an array of aiml files recursively found.
Class Method Details
.find(files_and_dirs) ⇒ Object
Returns an array of aiml files recursively found
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/programr/utils.rb', line 18 def self.find(files_and_dirs) files = [] files_and_dirs.each{|file| if File.file?(file) && (file =~ /.*\.aiml$/) files << file next end files += find(Dir.glob("#{file}/*")) } files end |