Class: FashionPolice::SpacesInFunctionDeclarations
- Inherits:
-
Object
- Object
- FashionPolice::SpacesInFunctionDeclarations
- Defined in:
- lib/fashion-police.rb
Instance Method Summary collapse
Instance Method Details
#error_message ⇒ Object
35 36 37 |
# File 'lib/fashion-police.rb', line 35 def "Put spaces in function declarations" end |
#test(string) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/fashion-police.rb', line 28 def test(string) return false if string.match(/function\(\.*\)\{/) return false if string.match(/function\s+\(.*\)\{/) return true if string.match(/function\s+\(.*\)\s+\{/) return true end |