Sha256: 3e4973fd24e71e7c2ea82b5b39cc20d0e2658dd0d9a5d5434cd487dfd1888095
Contents?: true
Size: 921 Bytes
Versions: 14
Compression:
Stored size: 921 Bytes
Contents
# frozen_string_literal: true require 'avm/applications/base' require 'eac_config/entry_path' require 'eac_ruby_utils/core_ext' module Avm module Sources class Base module Application APPLICATION_NAME_KEY = 'application' # @return [Avm::Applications::Base] def application @application ||= ::Avm::Applications::Base.new(application_id) end # @return [String] def application_id application_id_by_configuration || application_id_by_directory end # @return [String, nil] def application_id_by_configuration configuration.entry(APPLICATION_NAME_KEY).value end # @return [String] def application_id_by_directory path.basename.to_path.gsub(::EacConfig::EntryPath::PART_SEPARATOR, '-') .gsub(/\A-+/, '').gsub(/-+\z/, '') end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems