Module: RuboCop::Cop::TargetRailsVersion

Included in:
Rails::ActionFilter, Rails::ApplicationJob, Rails::ApplicationRecord, Rails::HttpPositionalArguments
Defined in:
lib/rubocop/cop/mixin/target_rails_version.rb

Overview

Common functionality for checking target rails version.

Instance Method Summary collapse

Instance Method Details

#minimum_target_rails_version(version) ⇒ Object



7
8
9
# File 'lib/rubocop/cop/mixin/target_rails_version.rb', line 7

def minimum_target_rails_version(version)
  @minimum_target_rails_version = version
end

#support_target_rails_version?(version) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/rubocop/cop/mixin/target_rails_version.rb', line 11

def support_target_rails_version?(version)
  @minimum_target_rails_version <= version
end