Module: RuboCop::Cop::TargetRubyVersion

Included in:
Lint::ErbNewArguments, Style::UnpackFirst
Defined in:
lib/rubocop/cop/mixin/target_ruby_version.rb

Overview

Common functionality for checking target ruby version.

Instance Method Summary collapse

Instance Method Details

#minimum_target_ruby_version(version) ⇒ Object



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

def minimum_target_ruby_version(version)
  @minimum_target_ruby_version = version
end

#support_target_ruby_version?(version) ⇒ Boolean

Returns:

  • (Boolean)


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

def support_target_ruby_version?(version)
  @minimum_target_ruby_version <= version
end