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.7.2.beta.2 lib/lookbook/features.rb
lookbook-0.7.2.beta.1 lib/lookbook/features.rb
lookbook-0.7.2.beta.0 lib/lookbook/features.rb
lookbook-0.7.1 lib/lookbook/features.rb
lookbook-0.7.0 lib/lookbook/features.rb