Class: ActiveHook::App::Validation

Inherits:
Struct
  • Object
show all
Defined in:
lib/activehook/app/middleware.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#reqObject

Returns the value of attribute req

Returns:

  • (Object)

    the current value of req



36
37
38
# File 'lib/activehook/app/middleware.rb', line 36

def req
  @req
end

Instance Method Details

#startObject



37
38
39
40
41
42
# File 'lib/activehook/app/middleware.rb', line 37

def start
  hook = { id: req.params['id'].to_i, key: req.params['key'] }
  ActiveHook::Validate.new(hook).perform
rescue
  false
end