Class: FashionPolice::SpacesBeforeAngleBrackets

Inherits:
Object
  • Object
show all
Defined in:
lib/fashion-police.rb

Instance Method Summary collapse

Instance Method Details

#error_messageObject



103
104
105
# File 'lib/fashion-police.rb', line 103

def error_message
  "Put spaces in front of angle brackets"
end

#test(string) ⇒ Object



96
97
98
99
100
101
# File 'lib/fashion-police.rb', line 96

def test(string)
  return true if string.match(/(\S+ )?\{/)
  return false if string.match(/\S\{/)

  return true
end