Module: Sapling::Memory::ClientAPI

Included in:
Sapling::Memory
Defined in:
lib/sapling/memory.rb

Instance Method Summary collapse

Instance Method Details

#active?(feature, options = {}) ⇒ Boolean

see Sapling::API::Client

Returns:

  • (Boolean)


49
50
51
52
# File 'lib/sapling/memory.rb', line 49

def active?(feature, options={})
  options = Util.normalized_options(options)
  (f = @features[feature]) && f.active?(options)
end

#active_features(options = {}) ⇒ Object

see Sapling::API::Client



59
60
61
# File 'lib/sapling/memory.rb', line 59

def active_features(options={})
  features.select {|feature| active?(feature,options)}
end

#featuresObject



54
55
56
# File 'lib/sapling/memory.rb', line 54

def features
  @features.keys.sort_by {|k| k.to_s}
end