Class: TaintedLove::Validator::Ignore

Inherits:
Base
  • Object
show all
Defined in:
lib/tainted_love/validator/ignore.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

validators

Class Attribute Details

.trace_hashesObject

Returns the value of attribute trace_hashes.



7
8
9
# File 'lib/tainted_love/validator/ignore.rb', line 7

def trace_hashes
  @trace_hashes
end

Instance Method Details

#remove?(warning) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
# File 'lib/tainted_love/validator/ignore.rb', line 12

def remove?(warning)
  hash = warning.stack_trace.trace_hash

  Ignore.trace_hashes.any? do |s|
    hash.start_with?(s)
  end
end