Class: Brakeman::Messages::FileName

Inherits:
Object
  • Object
show all
Defined in:
lib/brakeman/messages.rb

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ FileName

Returns a new instance of FileName.


132
133
134
# File 'lib/brakeman/messages.rb', line 132

def initialize file
  @file = file
end

Instance Method Details

#to_htmlObject


140
141
142
# File 'lib/brakeman/messages.rb', line 140

def to_html
  "<span class=\"filename\">#{CGI.escapeHTML(@file)}</span>"
end

#to_sObject


136
137
138
# File 'lib/brakeman/messages.rb', line 136

def to_s
  "`#{@file}`"
end