Sha256: b31a8712a92a9ac583aac5ce66b8c1916933ff99c9736dfcc50399bcb2cf8532

Contents?: true

Size: 572 Bytes

Versions: 7

Compression:

Stored size: 572 Bytes

Contents

module Lookbook
  module Features
    EXPERIMENTAL_FEATURES = [:params]

    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

7 entries across 7 versions & 1 rubygems

Version Path
lookbook-0.5.0.beta.2 lib/lookbook/features.rb
lookbook-0.5.0.beta.1 lib/lookbook/features.rb
lookbook-0.5.0.beta.0 lib/lookbook/features.rb
lookbook-0.4.8 lib/lookbook/features.rb
lookbook-0.4.7 lib/lookbook/features.rb
lookbook-0.4.6 lib/lookbook/features.rb
lookbook-0.4.5 lib/lookbook/features.rb