Class: Atom::Link

Inherits:
AttrEl show all
Defined in:
lib/atom/element.rb

Overview

A link has the following attributes:

href (required)

the link’s IRI

rel

the relationship of the linked item to the current item

type

a hint about the media type of the linked item

hreflang

the language of the linked item (RFC3066)

title

human-readable information about the link

length

a hint about the length (in octets) of the linked item

Instance Attribute Summary

Attributes inherited from Element

#base, #extensions

Instance Method Summary collapse

Methods inherited from AttrEl

#to_yaml

Methods inherited from Element

#[], #[]=, attrb, attrs, define_accessor, element, elements, inherited, #local_name, required, #taguri, #to_element, #to_s, #to_xml, #to_yaml, #to_yaml_properties

Constructor Details

#initialize(name = nil) ⇒ Link

:nodoc:



248
249
250
251
252
253
# File 'lib/atom/element.rb', line 248

def initialize name = nil # :nodoc:
  super name

  # just setting a default
  self["rel"] = "alternate"
end