Module: Flipper::Echo::InstanceMethods

Defined in:
lib/flipper/echo.rb

Overview

Instance methods to be included in the adapter’s singleton class

Instance Method Summary collapse

Instance Method Details

#clear(feature) ⇒ Object

Notify adapter clear events



58
59
60
# File 'lib/flipper/echo.rb', line 58

def clear(feature)
  super.tap { Flipper::Echo::Event.new(feature, :cleared).notify }
end

#disable(feature, gate, target) ⇒ Object

Notify adapter disable events



43
44
45
46
47
48
# File 'lib/flipper/echo.rb', line 43

def disable(feature, gate, target)
  super.tap do
    Flipper::Echo::Event.new(
      feature, :disabled, gate: gate, target: target).notify
  end
end

#enable(feature, gate, target) ⇒ Object

Notify adapter enable events



34
35
36
37
38
39
# File 'lib/flipper/echo.rb', line 34

def enable(feature, gate, target)
  super.tap do
    Flipper::Echo::Event.new(
      feature, :enabled, gate: gate, target: target).notify
  end
end

#remove(feature) ⇒ Object

Notify adapter remove events



52
53
54
# File 'lib/flipper/echo.rb', line 52

def remove(feature)
  super.tap { Flipper::Echo::Event.new(feature, :removed).notify }
end