Class: Aquanaut::PageNode

Inherits:
Node
  • Object
show all
Defined in:
lib/aquanaut/page_node.rb

Overview

A page node represents an actual page in the specified domain.

Direct Known Subclasses

AssetNode

Instance Attribute Summary collapse

Attributes inherited from Node

#adjacency_list

Instance Method Summary collapse

Methods inherited from Node

#add_edge

Constructor Details

#initialize(uri) ⇒ PageNode

Returns a new instance of PageNode.



11
12
13
14
# File 'lib/aquanaut/page_node.rb', line 11

def initialize(uri)
  @uri = uri
  super()
end

Instance Attribute Details

#uriObject (readonly)

Returns the value of attribute uri.



9
10
11
# File 'lib/aquanaut/page_node.rb', line 9

def uri
  @uri
end

Instance Method Details

#displayObject

Display method used on the front-end for the sitemap in list format.



18
19
20
21
22
# File 'lib/aquanaut/page_node.rb', line 18

def display
  part = "#{@uri.path}#{@uri.query}#{@uri.fragment}"
  part = @uri.to_s if part.empty?
  return part
end