Module: RuboCop::Cop::TargetRubyVersion
- Included in:
- Layout::HeredocIndentation, Lint::DuplicateMatchPattern, Lint::EmptyInPattern, Lint::ErbNewArguments, Lint::RedundantDirGlobSort, Lint::RefinementImportMethods, Lint::SafeNavigationChain, Naming::BlockForwarding, Style::AmbiguousEndlessMethodDefinition, Style::ArgumentsForwarding, Style::ArrayIntersect, Style::BitwisePredicate, Style::CollectionCompact, Style::ComparableClamp, Style::DataInheritance, Style::Dir, Style::DirEmpty, Style::EndlessMethod, Style::FileEmpty, Style::FrozenStringLiteralComment, Style::HashExcept, Style::HashTransformKeys, Style::HashTransformValues, Style::InPatternThen, Style::MapToHash, Style::MultilineInPatternThen, Style::NestedFileDirname, Style::NumberedParameters, Style::NumberedParametersLimit, Style::ObjectThen, Style::RedundantInterpolationUnfreeze, Style::SafeNavigation, Style::SlicingWithRange, Style::SymbolArray, Style::UnpackFirst
- Defined in:
- lib/rubocop/cop/mixin/target_ruby_version.rb
Overview
Common functionality for checking target ruby version.
Instance Method Summary collapse
- #minimum_target_ruby_version(version) ⇒ Object
- #required_minimum_ruby_version ⇒ Object
- #support_target_ruby_version?(version) ⇒ Boolean
Instance Method Details
#minimum_target_ruby_version(version) ⇒ Object
11 12 13 |
# File 'lib/rubocop/cop/mixin/target_ruby_version.rb', line 11 def minimum_target_ruby_version(version) @minimum_target_ruby_version = version end |
#required_minimum_ruby_version ⇒ Object
7 8 9 |
# File 'lib/rubocop/cop/mixin/target_ruby_version.rb', line 7 def required_minimum_ruby_version @minimum_target_ruby_version end |
#support_target_ruby_version?(version) ⇒ Boolean
15 16 17 |
# File 'lib/rubocop/cop/mixin/target_ruby_version.rb', line 15 def support_target_ruby_version?(version) required_minimum_ruby_version <= version end |