Class: RuboCop::Cop::Layout::SpaceAroundOperators
- Defined in:
- lib/rubocop/cop/layout/space_around_operators.rb
Instance Method Summary collapse
Methods inherited from Cop
Instance Method Details
#offense_message(operator, with_space, right_operand) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rubocop/cop/layout/space_around_operators.rb', line 7 def (operator, with_space, right_operand) if operator.is?('**') "ζ*'ヮ')ζ<うっうー!`**`のまわりにスペースがありますよー!" unless with_space.is?('**') elsif with_space.source !~ /^\s.*\s$/ "ζ*'ヮ')ζ<うっうー!`#{operator.source}`のまわりにスペースがありませんよー!" elsif excess_leading_space?(operator, with_space) || excess_trailing_space?(right_operand, with_space) "ζ*'ヮ')ζ<うっうー!`#{operator.source}`のまわりはスペース1こあけましょうねー!" end end |