Sha256: 5ac182a80463cef1d903ee6be055c22857a8fe981083acc60986c85ae64c5abc
Contents?: true
Size: 1.18 KB
Versions: 16
Compression:
Stored size: 1.18 KB
Contents
# frozen_string_literal: true module Avm module EacWebappBase0 module Instances class Base < ::Avm::Instances::Base module Apache common_concern class_methods do # @return [Class] def apache_path_class ancestors.lazy.map { |ancestor| apache_path_class_by_ancestor(ancestor) } .find(&:present?) || raise("No apache patch class found for \"#{self}\"") end private # @param ancestor [Module] # @return [Class] def apache_path_class_by_ancestor(ancestor) "#{ancestor.name.deconstantize}::ApachePath".constantize rescue ::NameError nil end end # @return [Class] def apache_path_class self.class.apache_path_class end # @return [Avm::EacUbuntuBase0::Apache::Resource, nil] def apache_resource %i[conf site] .lazy .map { |type| platform_instance.apache.send(type, install_apache_resource_name) } .find(&:available?) end end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems