Class: FastSubmissionProtection::FinishFilter

Inherits:
Struct
  • Object
show all
Defined in:
lib/fast_submission_protection/controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delayObject

Returns the value of attribute delay

Returns:

  • (Object)

    the current value of delay



76
77
78
# File 'lib/fast_submission_protection/controller.rb', line 76

def delay
  @delay
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



76
77
78
# File 'lib/fast_submission_protection/controller.rb', line 76

def name
  @name
end

Instance Method Details

#filter(controller) ⇒ Object



77
78
79
80
81
# File 'lib/fast_submission_protection/controller.rb', line 77

def filter controller
  if controller.protect_from_fast_submission?
    controller.submission_timer(name, delay).finish
  end
end