Sha256: ae801451fe3a974aeb265b2bb02c0bf192d5353ba11dde6dc4e1e93aad9fa3be

Contents?: true

Size: 607 Bytes

Versions: 10

Compression:

Stored size: 607 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
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_core-3.3.6 lib/spree/core/components.rb
spree_core-3.3.5 lib/spree/core/components.rb
spree_core-3.3.4 lib/spree/core/components.rb
spree_core-3.3.3 lib/spree/core/components.rb
spree_core-3.3.2 lib/spree/core/components.rb
spree_core-3.3.1 lib/spree/core/components.rb
spree_core-3.3.0 lib/spree/core/components.rb
spree_core-3.3.0.rc4 lib/spree/core/components.rb
spree_core-3.3.0.rc3 lib/spree/core/components.rb
spree_core-3.3.0.rc2 lib/spree/core/components.rb