Class: AntiSamy::Attribute
- Inherits:
-
Object
- Object
- AntiSamy::Attribute
- Defined in:
- lib/antisamy/model/attribute.rb
Overview
A model for HTML attributes and the “rules” they must follow (either literals or regular expressions) in order to be considered valid. This is a simple container class
Constant Summary collapse
- ACTION_REMOVE_TAG =
"removeTag"
- ACTION_FILTER_TAG =
"filterTag"
- ACTION_ENCODE_TAG =
"encodeTag"
- ACTION_REMOVE_ATTRIB =
"removeAttribute"
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#description ⇒ Object
Returns the value of attribute description.
-
#expressions ⇒ Object
Returns the value of attribute expressions.
-
#name ⇒ Object
Returns the value of attribute name.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(name) ⇒ Attribute
constructor
Create a new attribute.
Constructor Details
#initialize(name) ⇒ Attribute
Create a new attribute
11 12 13 14 15 16 17 |
# File 'lib/antisamy/model/attribute.rb', line 11 def initialize(name) @name = name @description = nil @action = nil @values = [] @expressions = [] end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
5 6 7 |
# File 'lib/antisamy/model/attribute.rb', line 5 def action @action end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/antisamy/model/attribute.rb', line 5 def description @description end |
#expressions ⇒ Object
Returns the value of attribute expressions.
5 6 7 |
# File 'lib/antisamy/model/attribute.rb', line 5 def expressions @expressions end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/antisamy/model/attribute.rb', line 5 def name @name end |
#values ⇒ Object
Returns the value of attribute values.
5 6 7 |
# File 'lib/antisamy/model/attribute.rb', line 5 def values @values end |