Class: FashionPolice::SpacesAroundArgumentsInForLoops
- Inherits:
-
Object
- Object
- FashionPolice::SpacesAroundArgumentsInForLoops
- Defined in:
- lib/fashion-police.rb
Instance Method Summary collapse
Instance Method Details
#error_message ⇒ Object
75 76 77 |
# File 'lib/fashion-police.rb', line 75 def "Put spaces around for loop arguments" end |
#test(string) ⇒ Object
69 70 71 72 73 |
# File 'lib/fashion-police.rb', line 69 def test(string) return false if string.match(/for\(\S+\s+[^\)]+\)/) return false if string.match(/for \(\S+\s+/) return true end |