Sha256: d600721fc4c081839b3256287d8720b72b4a55e617279a6966c242ae56311847

Contents?: true

Size: 911 Bytes

Versions: 6

Compression:

Stored size: 911 Bytes

Contents

module ForemanOpenscap
  module ClientConfig
    class Base
      delegate :server_param, :port_param, :policies_param, :config_item_name,
               :config_item_class_name, :override_method_name, :msg_name,
               :lookup_key_plural_name, :to => :constants

      def type
        raise NotImplementedError
      end

      def inline_help
        {
          :text => '',
          :replace_text => '',
          :route_helper_method => nil
        }
      end

      def managed_overrides?
        true
      end

      def available?
        raise NotImplementedError
      end

      def constants
        raise NotImplementedError
      end

      def collection_method
        constants.config_item_class_name&.pluralize&.underscore
      end

      def find_config_item(scope = config_item_class_name.constantize)
        scope.find_by :name => config_item_name
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_openscap-1.0.1 app/services/foreman_openscap/client_config/base.rb
foreman_openscap-1.0.0 app/services/foreman_openscap/client_config/base.rb
foreman_openscap-0.12.3 app/services/foreman_openscap/client_config/base.rb
foreman_openscap-0.12.2 app/services/foreman_openscap/client_config/base.rb
foreman_openscap-0.12.1 app/services/foreman_openscap/client_config/base.rb
foreman_openscap-0.12.0 app/services/foreman_openscap/client_config/base.rb