Class: Broadway::Link

Inherits:
Object
  • Object
show all
Includes:
Configurable, Convertible, Hierarchical, Processable, Resourceful, Sortable, Taggable, Comparable
Defined in:
lib/broadway/resources/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Resourceful

included

Methods included from Taggable

included

Methods included from Sortable

included

Methods included from Hierarchical

included

Methods included from Configurable

included

Methods included from Convertible

included

Methods included from Processable

included

Instance Attribute Details

#hrefObject

link category is the menu it’s in, or null



13
14
15
# File 'lib/broadway/resources/link.rb', line 13

def href
  @href
end

#relObject

link category is the menu it’s in, or null



13
14
15
# File 'lib/broadway/resources/link.rb', line 13

def rel
  @rel
end

#resourceObject

link category is the menu it’s in, or null



13
14
15
# File 'lib/broadway/resources/link.rb', line 13

def resource
  @resource
end

#targetObject

link category is the menu it’s in, or null



13
14
15
# File 'lib/broadway/resources/link.rb', line 13

def target
  @target
end

Instance Method Details

#inspectObject



25
26
27
# File 'lib/broadway/resources/link.rb', line 25

def inspect
  "#<#{self.class.name.to_s} @href='#{self.href.to_s}' @rel='#{self.rel.to_s}' @target='#{self.target.to_s}'/>"
end

#uriObject



21
22
23
# File 'lib/broadway/resources/link.rb', line 21

def uri
  @uri ||= Broadway::Uri.new(href)
end