Sha256: 2daef4eb41c05a24180df3fe8cff0b992a53c10cef48a42d7653ab87330ba9d7

Contents?: true

Size: 638 Bytes

Versions: 2

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Commands
    class IsServiceClass < Support::Command
      ##
      # @!attribute [r] service_class
      #   @return [Object] Can be any type.
      #
      attr_reader :service_class

      ##
      # @param service_class [Object] Can be any type.
      # @return [void]
      #
      def initialize(service_class:)
        @service_class = service_class
      end

      ##
      # @return [Boolean]
      #
      def call
        return unless service_class.instance_of?(::Class)

        service_class.include?(Service::Configs::Essential)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/commands/is_service_class.rb
convenient_service-0.19.0 lib/convenient_service/commands/is_service_class.rb