Module: RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods
- Defined in:
- lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb
Instance Method Summary collapse
-
#minimum_target_sorbet_static_version(version) ⇒ Object
Sets the version of the Sorbet static type checker required by this cop.
- #supports_target_sorbet_static_version?(version) ⇒ Boolean
Instance Method Details
#minimum_target_sorbet_static_version(version) ⇒ Object
Sets the version of the Sorbet static type checker required by this cop
15 16 17 |
# File 'lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb', line 15 def minimum_target_sorbet_static_version(version) @minimum_target_sorbet_static_version = Gem::Version.new(version) end |
#supports_target_sorbet_static_version?(version) ⇒ Boolean
19 20 21 |
# File 'lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb', line 19 def supports_target_sorbet_static_version?(version) @minimum_target_sorbet_static_version <= Gem::Version.new(version) end |