Class: Dojo

Inherits:
Object
  • Object
show all
Defined in:
lib/dojo.rb

Instance Method Summary collapse

Constructor Details

#initialize(dir, file_filter = "**/*.rb") ⇒ Dojo

Returns a new instance of Dojo.



7
8
9
10
# File 'lib/dojo.rb', line 7

def initialize(dir, file_filter = "**/*.rb")
  @dir = dir
  @file_filter = file_filter
end

Instance Method Details

#validate(options) ⇒ Object



12
13
14
15
16
17
# File 'lib/dojo.rb', line 12

def validate(options)
  Dir.glob("#{@dir}/#{@file_filter}").each do |file|
    validator = ClassValidator.new(file, options)
    validator.validate
  end
end