Class: Brakeman::Messages::Message
- Inherits:
 - 
      Object
      
        
- Object
 - Brakeman::Messages::Message
 
 
- Defined in:
 - lib/brakeman/messages.rb
 
Overview
Class to represent a list of message types
Instance Method Summary collapse
- #<<(msg) ⇒ Object
 - 
  
    
      #initialize(*args)  ⇒ Message 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Message.
 - #to_html ⇒ Object
 - #to_s ⇒ Object
 
Constructor Details
Instance Method Details
#<<(msg) ⇒ Object
      68 69 70 71 72 73 74  | 
    
      # File 'lib/brakeman/messages.rb', line 68 def << msg if msg.is_a? String @parts << Brakeman::Messages::Plain.new(msg) else @parts << msg end end  | 
  
#to_html ⇒ Object
      88 89 90 91 92 93 94 95 96 97 98 99 100  | 
    
      # File 'lib/brakeman/messages.rb', line 88 def to_html require 'cgi' output = @parts.map(&:to_html).join case @parts.first when Brakeman::Messages::Code, Brakeman::Messages::Literal, Brakeman::Messages::Version else output[0] = output[0].capitalize end output end  |