class Spellcop::FolderChecker
Attributes
files[R]
warnings[R]
Public Class Methods
new(foldername, recursive = true)
click to toggle source
# File lib/spellcop/folder_checker.rb, line 5 def initialize(foldername, recursive = true) @warnings = [] if recursive @folder = "#{foldername}/**/*.rb" else @folder = "#{foldername}/*.rb" end @files = [] end
Public Instance Methods
check!()
click to toggle source
# File lib/spellcop/folder_checker.rb, line 15 def check! Dir[@folder].each do |file| result = { file: file, warnings: FileChecker.new(file).check! } @warnings << result unless result[:warnings].empty? @files << file end @warnings end