Class: AntiSamy::ScanMessage
- Inherits:
-
Object
- Object
- AntiSamy::ScanMessage
- Defined in:
- lib/antisamy/scan_results.rb
Overview
Scan message, it will contain a message key, tag and optionally content, value
Constant Summary collapse
- ERROR_TAG_NOT_IN_POLICY =
error.tag.notfound
"error.tag.notfound"
- ERROR_TAG_DISALLOWED =
error.tag.removed
"error.tag.removed"
- ERROR_TAG_FILTERED =
error.tag.filtered
"error.tag.filtered"
- ERROR_TAG_ENCODED =
error.tag.encoded
"error.tag.encoded"
- ERROR_CSS_TAG_MALFORMED =
error.css.tag.malformed
"error.css.tag.malformed"
- ERROR_CSS_ATTRIBUTE_MALFORMED =
error.css.attribute.malformed
"error.css.attribute.malformed"
- ERROR_ATTRIBUTE_CAUSE_FILTER =
error.attribute.invalid.filtered
"error.attribute.invalid.filtered"
- ERROR_ATTRIBUTE_CAUSE_ENCODE =
error.attribute.invalid.encoded
"error.attribute.invalid.encoded"
- ERROR_ATTRIBUTE_INVALID_FILTERED =
error.attribute.invalid.filtered
"error.attribute.invalid.filtered"
- ERROR_ATTRIBUTE_INVALID_REMOVED =
error.attribute.invalid.removed
"error.attribute.invalid.removed"
- ERROR_ATTRIBUTE_NOT_IN_POLICY =
error.attribute.notfound
"error.attribute.notfound"
- ERROR_ATTRIBUTE_INVALID =
error.attribute.invalid
"error.attribute.invalid"
- ERROR_COMMENT_REMOVED =
comment removed
"error.comment.removed"
- ERROR_CSS_TAG_RULE_NOTFOUND =
tag rule not found
"error.css.tag.notfound"
- ERROR_STYLESHEET_RULE_NOTFOUND =
style sheet nto found
"error.stylesheet.notfound"
- ERROR_CSS_IMPORT_DISABLED =
embedded stylesheets disabled
"error.css.import.disabled"
- ERROR_CSS_IMPORT_URL_INVALID =
bad uri
"error.css.import.uri.invalid"
- ERROR_CSS_TAG_SELECTOR_DISALLOWED =
disallowed selector
"error.css.tag.removed"
- ERROR_STYLESHEET_SELECTOR_DISALLOWED =
invalid for style sheet
"error.style.tag.notallowed"
- ERROR_CSS_TAG_PROPERTY_INVALID =
invlaid css tag property
"error.css.property.invalid"
- ERROR_STYLESHEET_PROPERTY_INVALID =
invid style sheet roperty tag
"error.stylesheet.css.property.invalid"
- ERROR_CSS_IMPORT_EXCEEDED =
exceed alloted imports
"error.import.exceeded.sheets"
- ERROR_CSS_IMPORT_INPUT_SIZE =
exceede size
"error.import.exceeded.size"
- ERROR_CSS_IMPORT_FAILURE =
Failed to import
"error.import.bad.uri"
- ERROR_STYLESHEET_SELECTOR_NOTFOUND =
selector not found
"error.css.stylesheet.selector.notfound"
- ERROR_CSS_TAG_SELECTOR_NOTFOUND =
selector in css not fond
"error.css.tag.selector.notfound"
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#msgkey ⇒ Object
readonly
Returns the value of attribute msgkey.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(msgkey, tag, content = nil, value = nil) ⇒ ScanMessage
constructor
A new instance of ScanMessage.
- #to_s ⇒ Object
Constructor Details
#initialize(msgkey, tag, content = nil, value = nil) ⇒ ScanMessage
Returns a new instance of ScanMessage.
59 60 61 62 63 64 |
# File 'lib/antisamy/scan_results.rb', line 59 def initialize(msgkey, tag, content=nil,value=nil) @msgkey = msgkey @tag = tag @content = content @value = value end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
58 59 60 |
# File 'lib/antisamy/scan_results.rb', line 58 def content @content end |
#msgkey ⇒ Object (readonly)
Returns the value of attribute msgkey.
58 59 60 |
# File 'lib/antisamy/scan_results.rb', line 58 def msgkey @msgkey end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
58 59 60 |
# File 'lib/antisamy/scan_results.rb', line 58 def tag @tag end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
58 59 60 |
# File 'lib/antisamy/scan_results.rb', line 58 def value @value end |
Instance Method Details
#to_s ⇒ Object
65 66 67 |
# File 'lib/antisamy/scan_results.rb', line 65 def to_s "#{self.msgkey} #{@tag} #{@content} #{@value}" end |