module Arturo::FeatureCaching::PrependMethods

Public Instance Methods

to_feature(feature_or_symbol) click to toggle source

Wraps Arturo::Feature.to_feature with in-memory caching.

Calls superclass method
# File lib/arturo/feature_caching.rb, line 24
def to_feature(feature_or_symbol)
  if !caches_features?
    super
  elsif feature_or_symbol.kind_of?(Arturo::Feature)
    feature_or_symbol
  else
    symbol = feature_or_symbol.to_sym
    feature_caching_strategy.fetch(feature_cache, symbol) { super(symbol) }
  end
end