class ZombieScout::RubyProject
Public Class Methods
new(*globs)
click to toggle source
# File lib/zombie_scout/ruby_project.rb, line 7 def initialize(*globs) @globs = globs @globs = %w[app config lib] if @globs.empty? end
Public Instance Methods
folders()
click to toggle source
# File lib/zombie_scout/ruby_project.rb, line 33 def folders # TODO this is only called from Mission...weird? %w[app config lib].select { |folder| Dir.exist?(folder) } end
globs()
click to toggle source
# File lib/zombie_scout/ruby_project.rb, line 22 def globs pathnames = @globs.map { |g| Pathname.new(g) } pathnames.map { |pathname| if pathname.directory? "#{pathname}/**/*.rb" else pathname.to_s end } end
ruby_file_paths()
click to toggle source
# File lib/zombie_scout/ruby_project.rb, line 16 def ruby_file_paths globs.map { |glob| Dir.glob(glob) }.flatten.map { |path| path.sub(/^\//, '') } end
ruby_sources()
click to toggle source
# File lib/zombie_scout/ruby_project.rb, line 12 def ruby_sources ruby_file_paths.map { |path| RubySource.new(path) } end