Class: Enabler::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/enabler/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#storeObject

Returns the value of attribute store.



5
6
7
# File 'lib/enabler/config.rb', line 5

def store
  @store
end

Instance Method Details

#after_disabling(feature, &block) ⇒ Object



19
20
21
# File 'lib/enabler/config.rb', line 19

def after_disabling(feature, &block)
  after_disablings[feature.to_sym] = block
end

#after_disablingsObject



31
32
33
# File 'lib/enabler/config.rb', line 31

def after_disablings
  @after_disablings ||= {}
end

#after_enabling(feature, &block) ⇒ Object



15
16
17
# File 'lib/enabler/config.rb', line 15

def after_enabling(feature, &block)
  after_enablings[feature.to_sym] = block
end

#after_enablingsObject



27
28
29
# File 'lib/enabler/config.rb', line 27

def after_enablings
  @after_enablings ||= {}
end

#persistence(val) ⇒ Object



11
12
13
# File 'lib/enabler/config.rb', line 11

def persistence(val)
  self.store = val
end

#rule(feature, &block) ⇒ Object



7
8
9
# File 'lib/enabler/config.rb', line 7

def rule(feature, &block)
  rules << Rule.new(feature.to_sym, block)
end

#rulesObject



23
24
25
# File 'lib/enabler/config.rb', line 23

def rules
  @rules ||= []
end