Class: Polites::Span::Link
- Inherits:
-
Polites::Span
- Object
- Node
- Polites::Span
- Polites::Span::Link
- Defined in:
- lib/polites/span/link.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from Node
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(children = [], url:, title: nil) ⇒ Link
constructor
A new instance of Link.
Methods inherited from Polites::Span
Methods inherited from Node
Constructor Details
#initialize(children = [], url:, title: nil) ⇒ Link
Returns a new instance of Link.
9 10 11 12 13 |
# File 'lib/polites/span/link.rb', line 9 def initialize(children = [], url:, title: nil) super(children) @url = url @title = title end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/polites/span/link.rb', line 7 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/polites/span/link.rb', line 7 def url @url end |
Instance Method Details
#eql?(other) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/polites/span/link.rb', line 15 def eql?(other) super && url == other.url && title == other.title end |