Module: Messed::Controller::Processing

Included in:
Messed
Defined in:
lib/messed/controller/processing.rb

Class Method Summary collapse

Class Method Details

.included(target) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/messed/controller/processing.rb', line 5

def self.included(target)

  target.send(:class_variable_set, :@@after, []) unless target.send(:class_variable_defined?, :@@after)
  target.class_eval "

    def self.after_processing(t)
      @@after << t
    end

    def reset_processing!
      @@after.each {|a| send(a)}
    end
  "

end