class Brakeman::Messages::Input
Public Class Methods
new(input)
click to toggle source
# File lib/brakeman/messages.rb, line 146 def initialize input @input = input @value = friendly_type_of(@input) end
Public Instance Methods
friendly_type_of(input_type)
click to toggle source
# File lib/brakeman/messages.rb, line 151 def friendly_type_of input_type if input_type.is_a? Brakeman::BaseCheck::Match input_type = input_type.type end case input_type when :params "parameter value" when :cookies "cookie value" when :request "request value" when :model "model attribute" else "user input" end end
to_html()
click to toggle source
# File lib/brakeman/messages.rb, line 174 def to_html self.to_s end
to_s()
click to toggle source
# File lib/brakeman/messages.rb, line 170 def to_s @value end