Class: Polites::Tag
- Inherits:
-
Object
- Object
- Polites::Tag
- Defined in:
- lib/polites/tag.rb
Overview
A tag is used to define the markup used in Polites documents.
Instance Attribute Summary collapse
- #name ⇒ String readonly
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(name) ⇒ Tag
constructor
A new instance of Tag.
Constructor Details
#initialize(name) ⇒ Tag
Returns a new instance of Tag.
10 11 12 |
# File 'lib/polites/tag.rb', line 10 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ String (readonly)
7 8 9 |
# File 'lib/polites/tag.rb', line 7 def name @name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
14 15 16 |
# File 'lib/polites/tag.rb', line 14 def eql?(other) other.is_a?(self.class) && name == other.name end |