Class: Roo::Link
- Inherits:
-
String
- Object
- String
- Roo::Link
- Defined in:
- lib/roo/link.rb
Instance Attribute Summary collapse
-
#href ⇒ Object
(also: #url)
readonly
Returns the value of attribute href.
Instance Method Summary collapse
-
#initialize(href = '', text = href) ⇒ Link
constructor
A new instance of Link.
- #to_uri ⇒ Object
Constructor Details
#initialize(href = '', text = href) ⇒ Link
Returns a new instance of Link.
6 7 8 9 |
# File 'lib/roo/link.rb', line 6 def initialize(href='', text=href) super(text) @href = href end |
Instance Attribute Details
#href ⇒ Object (readonly) Also known as: url
Returns the value of attribute href.
3 4 5 |
# File 'lib/roo/link.rb', line 3 def href @href end |
Instance Method Details
#to_uri ⇒ Object
11 12 13 |
# File 'lib/roo/link.rb', line 11 def to_uri URI.parse href end |