Class: Roo::Link

Inherits:
String
  • Object
show all
Defined in:
lib/roo/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hrefObject (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_uriObject



11
12
13
# File 'lib/roo/link.rb', line 11

def to_uri
  URI.parse href
end