Class: ClassValidator
- Inherits:
-
Object
- Object
- ClassValidator
- Defined in:
- lib/class_validator.rb
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ ClassValidator
constructor
A new instance of ClassValidator.
- #validate ⇒ Object
Constructor Details
#initialize(file, options = {}) ⇒ ClassValidator
Returns a new instance of ClassValidator.
2 3 4 5 |
# File 'lib/class_validator.rb', line 2 def initialize(file, ={}) @file = file @options = end |
Instance Method Details
#validate ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/class_validator.rb', line 7 def validate code = File.open(@file).read rules.each do |rule| next if rule.valid?(code) puts "#{@file}: #{rule.}" end end |