Method: Rollout#with_feature
- Defined in:
- lib/rollout.rb
permalink #with_feature(feature) ⇒ Object
[View source]
198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/rollout.rb', line 198 def with_feature(feature) f = get(feature) if count_observers > 0 before = Marshal.load(Marshal.dump(f)) yield(f) save(f) changed notify_observers(:update, before, f) else yield(f) save(f) end end |