class Subjoin::Link
A link object
Attributes
href[R]
The URL for this link @return String
Public Class Methods
new(data)
click to toggle source
# File lib/subjoin/link.rb, line 10 def initialize(data) if data.is_a? String @href = URI(data) else @href = URI(data['href']) @meta = load_meta(data['meta']) end end
Public Instance Methods
get()
click to toggle source
Get the resource identified by the URL @return [Document]
# File lib/subjoin/link.rb, line 26 def get Document.new(@href) end
to_s()
click to toggle source
Returns the {#href} attribute
# File lib/subjoin/link.rb, line 20 def to_s @href.to_s end