Class: Brakeman::Messages::Code
- Inherits:
-
Object
- Object
- Brakeman::Messages::Code
- Defined in:
- lib/brakeman/messages.rb
Instance Method Summary collapse
-
#initialize(code) ⇒ Code
constructor
A new instance of Code.
- #to_html ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(code) ⇒ Code
Returns a new instance of Code.
104 105 106 |
# File 'lib/brakeman/messages.rb', line 104 def initialize code @code = code.to_s end |
Instance Method Details
#to_html ⇒ Object
112 113 114 |
# File 'lib/brakeman/messages.rb', line 112 def to_html "<span class=\"code\">#{CGI.escapeHTML(@code)}</span>" end |
#to_s ⇒ Object
108 109 110 |
# File 'lib/brakeman/messages.rb', line 108 def to_s "`#{@code}`" end |