Module: ActiveData::Model::Callbacks::PrependMethods

Defined in:
lib/active_data/model/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#create_object(&block) ⇒ Object



56
57
58
# File 'lib/active_data/model/callbacks.rb', line 56

def create_object(&block)
  run_callbacks(:create) { super(&block) }
end

#destroy_object(&block) ⇒ Object



64
65
66
# File 'lib/active_data/model/callbacks.rb', line 64

def destroy_object(&block)
  run_callbacks(:destroy) { super(&block) }
end

#initialize(*_) ⇒ Object



47
48
49
50
# File 'lib/active_data/model/callbacks.rb', line 47

def initialize(*_)
  super
  run_callbacks :initialize
end

#save_object(&block) ⇒ Object



52
53
54
# File 'lib/active_data/model/callbacks.rb', line 52

def save_object(&block)
  run_callbacks(:save) { super(&block) }
end

#update_object(&block) ⇒ Object



60
61
62
# File 'lib/active_data/model/callbacks.rb', line 60

def update_object(&block)
  run_callbacks(:update) { super(&block) }
end