Module: Grape::DSL::Callbacks::ClassMethods

Defined in:
lib/grape/dsl/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#after(&block) ⇒ Object



21
22
23
# File 'lib/grape/dsl/callbacks.rb', line 21

def after(&block)
  imbue(:afters, [block])
end

#after_validation(&block) ⇒ Object



17
18
19
# File 'lib/grape/dsl/callbacks.rb', line 17

def after_validation(&block)
  imbue(:after_validations, [block])
end

#before(&block) ⇒ Object



9
10
11
# File 'lib/grape/dsl/callbacks.rb', line 9

def before(&block)
  imbue(:befores, [block])
end

#before_validation(&block) ⇒ Object



13
14
15
# File 'lib/grape/dsl/callbacks.rb', line 13

def before_validation(&block)
  imbue(:before_validations, [block])
end