class SecurityReport::Problem
Public Class Methods
new(identifier, description, url)
click to toggle source
# File lib/security_report/problem.rb, line 3 def initialize(identifier, description, url) @identifier = identifier @description = description @url = url end
Public Instance Methods
summary()
click to toggle source
# File lib/security_report/problem.rb, line 9 def summary "#{@identifier} (#{truncate(@description, 30)})" end
Private Instance Methods
truncate(string, max)
click to toggle source
# File lib/security_report/problem.rb, line 15 def truncate(string, max) string.length > max ? "#{string[0 ... max - 3].strip}..." : string end