Class: Polites::RangeTag
Overview
A range tag is a Tag defined by a start and an end pattern, such as used by defining bold formatting.
Instance Attribute Summary collapse
- #end_pattern ⇒ String readonly
- #start_pattern ⇒ String readonly
Attributes inherited from Tag
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(name, start_pattern, end_pattern) ⇒ RangeTag
constructor
A new instance of RangeTag.
Constructor Details
#initialize(name, start_pattern, end_pattern) ⇒ RangeTag
Returns a new instance of RangeTag.
17 18 19 20 21 |
# File 'lib/polites/range_tag.rb', line 17 def initialize(name, start_pattern, end_pattern) super(name) @start_pattern = start_pattern @end_pattern = end_pattern end |
Instance Attribute Details
#end_pattern ⇒ String (readonly)
12 13 14 |
# File 'lib/polites/range_tag.rb', line 12 def end_pattern @end_pattern end |
#start_pattern ⇒ String (readonly)
10 11 12 |
# File 'lib/polites/range_tag.rb', line 10 def start_pattern @start_pattern end |
Instance Method Details
#eql?(other) ⇒ Boolean
23 24 25 26 27 |
# File 'lib/polites/range_tag.rb', line 23 def eql?(other) super && start_pattern == other.start_pattern && end_pattern == other.end_pattern end |