Sha256: 46ca0b291ed28f75756f4e44726092ef03b3a87eba1591f23baa61c886cbd0ab

Contents?: true

Size: 571 Bytes

Versions: 25

Compression:

Stored size: 571 Bytes

Contents

module Lookbook
  module Features
    EXPERIMENTAL_FEATURES = [:pages]

    def self.experimental_feature?(name)
      EXPERIMENTAL_FEATURES.include?(name.to_sym)
    end

    def self.enabled?(name)
      return true unless experimental_feature?(name)
      enabled.include?(name.to_sym)
    end

    def self.enabled
      if Lookbook.config.experimental_features == true
        EXPERIMENTAL_FEATURES
      elsif Lookbook.config.experimental_features.blank?
        []
      else
        Lookbook.config.experimental_features.map(&:to_sym)
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
lookbook-0.9.8 lib/lookbook/features.rb
lookbook-0.9.7 lib/lookbook/features.rb
lookbook-0.9.6 lib/lookbook/features.rb
lookbook-0.9.5 lib/lookbook/features.rb
lookbook-0.9.4 lib/lookbook/features.rb
lookbook-0.9.3 lib/lookbook/features.rb
lookbook-0.9.2 lib/lookbook/features.rb
lookbook-0.9.1 lib/lookbook/features.rb
lookbook-0.9.0 lib/lookbook/features.rb
lookbook-0.8.3 lib/lookbook/features.rb
lookbook-0.8.2 lib/lookbook/features.rb
lookbook-0.8.1 lib/lookbook/features.rb
lookbook-0.8.0 lib/lookbook/features.rb
lookbook-0.8.0.beta.0 lib/lookbook/features.rb
lookbook-0.7.4 lib/lookbook/features.rb
lookbook-0.7.3 lib/lookbook/features.rb
lookbook-0.7.2 lib/lookbook/features.rb
lookbook-0.7.2.beta.5 lib/lookbook/features.rb
lookbook-0.7.2.beta.4 lib/lookbook/features.rb
lookbook-0.7.2.beta.3 lib/lookbook/features.rb