Sha256: 594fca3e78818f42620138f1f07582ee79ccae292ba9f3aeefcf64c6894f2048

Contents?: true

Size: 962 Bytes

Versions: 31

Compression:

Stored size: 962 Bytes

Contents

module Spree
  module Core
    class Engine < ::Rails::Engine
      def self.api_available?
        @@api_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Api::Engine')
      end

      def self.backend_available?
        @@backend_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Backend::Engine')
      end

      def self.frontend_available?
        @@frontend_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Frontend::Engine')
      end

      def self.emails_available?
        @@emails_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Emails::Engine')
      end

      def self.sample_available?
        @@sample_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('SpreeSample::Engine')
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
spree_core-4.9.0 lib/spree/core/components.rb
spree_core-4.8.3 lib/spree/core/components.rb
spree_core-4.8.2 lib/spree/core/components.rb
spree_core-4.7.3 lib/spree/core/components.rb
spree_core-4.6.6 lib/spree/core/components.rb
spree_core-4.5.5 lib/spree/core/components.rb
spree_core-4.3.3 lib/spree/core/components.rb
spree_core-4.4.1 lib/spree/core/components.rb
spree_core-4.5.4 lib/spree/core/components.rb
spree_core-4.6.5 lib/spree/core/components.rb
spree_core-4.7.2 lib/spree/core/components.rb
spree_core-4.7.1 lib/spree/core/components.rb
spree_core-4.6.4 lib/spree/core/components.rb
spree_core-4.7.0 lib/spree/core/components.rb
spree_core-4.6.3 lib/spree/core/components.rb
spree_core-4.6.2 lib/spree/core/components.rb
spree_core-4.6.1 lib/spree/core/components.rb
spree_core-4.6.0 lib/spree/core/components.rb
spree_core-4.5.3 lib/spree/core/components.rb
spree_core-4.5.2 lib/spree/core/components.rb