Module: Stance

Defined in:
lib/stance.rb,
lib/stance/event.rb,
lib/stance/engine.rb,
lib/stance/events.rb,
lib/stance/version.rb,
lib/stance/eventable.rb,
app/models/stance/event_record.rb,
lib/stance/active_record_events.rb,
lib/stance/active_record_callbacks.rb,
lib/generators/stance/install_generator.rb

Defined Under Namespace

Modules: ActiveRecordCallbacks, ActiveRecordEvents, Eventable, Generators Classes: DuplicateEvent, Engine, Error, Event, EventNotFound, EventRecord, Events

Constant Summary collapse

VERSION =
'0.8.3'
@@disabled_events =
[]

Class Method Summary collapse

Class Method Details

.disable(*events) ⇒ Object



14
15
16
17
18
19
# File 'lib/stance.rb', line 14

def self.disable(*events)
  disabled_events.concat events
  yield
ensure
  self.disabled_events -= events
end