Class: SyntaxFix::Checker
- Inherits:
-
Object
- Object
- SyntaxFix::Checker
- Defined in:
- lib/syntax_fix/checker.rb
Instance Attribute Summary collapse
-
#rel_path ⇒ Object
Returns the value of attribute rel_path.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
Instance Attribute Details
#rel_path ⇒ Object
Returns the value of attribute rel_path.
3 4 5 |
# File 'lib/syntax_fix/checker.rb', line 3 def rel_path @rel_path end |
#verbose ⇒ Object
Returns the value of attribute verbose.
3 4 5 |
# File 'lib/syntax_fix/checker.rb', line 3 def verbose @verbose end |
Instance Method Details
#fix_code(path) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/syntax_fix/checker.rb', line 5 def fix_code(path) dirfile = SyntaxFix::DirFile.new(path) if dirfile.is_dir? Dir.foreach(path) do |name| current_item = SyntaxFix::DirFile.new([path, name].join('/')) current_item.is_dir? ? fix_code(current_item.path) : fix_file(current_item) end elsif dirfile.is_file? fix_file dirfile end end |