Sha256: 7364aa035353d9ed7eae91e25706fb37ee9fe7f49917adf214f5ec2e2496d69d
Contents?: true
Size: 621 Bytes
Versions: 7
Compression:
Stored size: 621 Bytes
Contents
# frozen_string_literal: true module AppMap module Service class ConfigAnalyzer attr_reader :config_error def initialize(config_file) @config_file = config_file @config = load_config end def app_name @config.to_h[:name] if present? end def present? File.exist?(@config_file) end def valid? present? && @config.to_h.key?(:name) && @config.to_h.key?(:packages) end private def load_config AppMap::Config.load_from_file @config_file if present? rescue nil end end end end
Version data entries
7 entries across 7 versions & 1 rubygems