Class: FashionPolice::SpacesAroundEqualsSigns

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

Instance Method Summary collapse

Instance Method Details

#error_messageObject



63
64
65
# File 'lib/fashion-police.rb', line 63

def error_message
  "Put spaces around equals signs"
end

#test(string) ⇒ Object



57
58
59
60
61
# File 'lib/fashion-police.rb', line 57

def test(string)
  return true if string.match(/ = /)
  return false if string.match(/\S=[^=]/)
  return true
end