Class: FashionPolice::SpacesAroundArgumentsInSquareBrackets
- Inherits:
-
Object
- Object
- FashionPolice::SpacesAroundArgumentsInSquareBrackets
- Defined in:
- lib/fashion-police.rb
Instance Method Summary collapse
Instance Method Details
#error_message ⇒ Object
129 130 131 |
# File 'lib/fashion-police.rb', line 129 def "Put spaces around arguments inside square brackets" end |
#test(string) ⇒ Object
122 123 124 125 126 127 |
# File 'lib/fashion-police.rb', line 122 def test(string) return true if string.match(/\[ .* \]/) return false if string.match(/\[[^\]]+\]/) return true end |