class RuboCop::Cop::Layout::SpaceAroundOperators

Public Instance Methods

offense_message(type, operator, with_space, right_operand) click to toggle source
# File lib/rubocop/cop/layout/space_around_operators.rb, line 7
def offense_message(type, operator, with_space, right_operand)
  if operator.is?('**')
    "ζ*'ヮ')ζ<うっうー!`**`のまわりにスペースがありますよー!" unless with_space.is?('**')
  elsif with_space.source !~ /^\s.*\s$/
    "ζ*'ヮ')ζ<うっうー!`#{operator.source}`のまわりにスペースがありませんよー!"
  elsif excess_leading_space?(type, operator, with_space) ||
        excess_trailing_space?(right_operand, with_space)
    "ζ*'ヮ')ζ<うっうー!`#{operator.source}`のまわりはスペース1こあけましょうねー!"
  end
end