Module: ActionService::Invocation::ClassMethods

Defined in:
lib/action_service/invocation.rb

Instance Method Summary collapse

Instance Method Details

#after_invocation_interceptorsObject



49
50
51
# File 'lib/action_service/invocation.rb', line 49

def after_invocation_interceptors
  read_inheritable_attribute("after_invocation_interceptors")
end

#append_after_invocation(*interceptors, &block) ⇒ Object Also known as: after_invocation



29
30
31
32
33
34
# File 'lib/action_service/invocation.rb', line 29

def append_after_invocation(*interceptors, &block)
  conditions = extract_conditions!(interceptors)
  interceptors << block if block_given?
  add_interception_conditions(interceptors, conditions)
  append_interceptors_to_chain("after", interceptors)
end

#append_before_invocation(*interceptors, &block) ⇒ Object Also known as: before_invocation



13
14
15
16
17
18
# File 'lib/action_service/invocation.rb', line 13

def append_before_invocation(*interceptors, &block)
  conditions = extract_conditions!(interceptors)
  interceptors << block if block_given?
  add_interception_conditions(interceptors, conditions)
  append_interceptors_to_chain("before", interceptors)
end

#before_invocation_interceptorsObject



45
46
47
# File 'lib/action_service/invocation.rb', line 45

def before_invocation_interceptors
  read_inheritable_attribute("before_invocation_interceptors")
end

#excluded_intercepted_methodsObject



57
58
59
# File 'lib/action_service/invocation.rb', line 57

def excluded_intercepted_methods
  read_inheritable_attribute("excluded_intercepted_methods") || {}
end

#included_intercepted_methodsObject



53
54
55
# File 'lib/action_service/invocation.rb', line 53

def included_intercepted_methods
  read_inheritable_attribute("included_intercepted_methods") || {}
end

#prepend_after_invocation(*interceptors, &block) ⇒ Object



36
37
38
39
40
41
# File 'lib/action_service/invocation.rb', line 36

def prepend_after_invocation(*interceptors, &block)
  conditions = extract_conditions!(interceptors)
  interceptors << block if block_given?
  add_interception_conditions(interceptors, conditions)
  prepend_interceptors_to_chain("after", interceptors)
end

#prepend_before_invocation(*interceptors, &block) ⇒ Object



20
21
22
23
24
25
# File 'lib/action_service/invocation.rb', line 20

def prepend_before_invocation(*interceptors, &block)
  conditions = extract_conditions!(interceptors)
  interceptors << block if block_given?
  add_interception_conditions(interceptors, conditions)
  prepend_interceptors_to_chain("before", interceptors)
end