Class: Polites::SimpleTag
Overview
A simple tag is a Tag defined by a single pattern, such as for headings.
Instance Attribute Summary collapse
- #pattern ⇒ String readonly
Attributes inherited from Tag
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(name, pattern) ⇒ SimpleTag
constructor
A new instance of SimpleTag.
Constructor Details
#initialize(name, pattern) ⇒ SimpleTag
Returns a new instance of SimpleTag.
13 14 15 16 |
# File 'lib/polites/simple_tag.rb', line 13 def initialize(name, pattern) super(name) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ String (readonly)
9 10 11 |
# File 'lib/polites/simple_tag.rb', line 9 def pattern @pattern end |
Instance Method Details
#eql?(other) ⇒ Boolean
18 19 20 |
# File 'lib/polites/simple_tag.rb', line 18 def eql?(other) super && pattern == other.pattern end |