Class: Subjoin::Link
Overview
A link object
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
The URL for this link.
Attributes included from Metable
Instance Method Summary collapse
-
#get ⇒ Document
Get the resource identified by the URL.
-
#initialize(data) ⇒ Link
constructor
A new instance of Link.
-
#to_s ⇒ Object
Returns the #href attribute.
Methods included from Metable
Constructor Details
#initialize(data) ⇒ Link
Returns a new instance of Link.
10 11 12 13 14 15 16 17 |
# File 'lib/subjoin/link.rb', line 10 def initialize(data) if data.is_a? String @href = URI(data) else @href = URI(data['href']) = (data['meta']) end end |
Instance Attribute Details
#href ⇒ Object (readonly)
The URL for this link
8 9 10 |
# File 'lib/subjoin/link.rb', line 8 def href @href end |