Class: MetzScan::Commands::Scan::ProjectConfigScope::TargetRubyVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/metz_scan/commands/scan/project_config_scope.rb

Instance Method Summary collapse

Constructor Details

#initialize(paths, store: ConfigStore.new, loader: ConfigLoader.new) ⇒ TargetRubyVersion

Returns a new instance of TargetRubyVersion.



51
52
53
54
55
# File 'lib/metz_scan/commands/scan/project_config_scope.rb', line 51

def initialize(paths, store: ConfigStore.new, loader: ConfigLoader.new)
  @paths = paths
  @store = store
  @loader = loader
end

Instance Method Details

#versionObject



57
58
59
60
61
# File 'lib/metz_scan/commands/scan/project_config_scope.rb', line 57

def version
  config.target_ruby_version
rescue RuboCop::Error, Psych::Exception
  nil
end