Exception: Mry::AddedCops::RuboCopVersionMismatchError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mry/added_cops.rb

Instance Method Summary collapse

Constructor Details

#initialize(expected:) ⇒ RuboCopVersionMismatchError

Returns a new instance of RuboCopVersionMismatchError.



252
253
254
# File 'lib/mry/added_cops.rb', line 252

def initialize(expected:)
  @expected = expected
end

Instance Method Details

#messageObject



256
257
258
259
260
261
262
263
264
# File 'lib/mry/added_cops.rb', line 256

def message
  <<~MES

    `require 'rubocop'` is failed because mry can't find rubocop v#{@expected}.
    Execute `gem install rubocop -v #{@expected}`.
    Or update rubocop version in your Gemfile, and execute `bundle install` if you use `bundle exec`.

  MES
end