Class: N::SitePage
- Inherits:
-
Object
- Object
- N::SitePage
- Defined in:
- lib/n/sitemap.rb
Overview
SitePage
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#description ⇒ Object
description of the page.
-
#flag ⇒ Object
Returns the value of attribute flag.
-
#level ⇒ Object
Returns the value of attribute level.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#real_uri ⇒ Object
the real uri to this page calculated by the page overloader).
-
#realm ⇒ Object
the realm this page belongs to, typically the part name.
-
#shader ⇒ Object
the shader for this page, overrided the shader calculated by the engine.
-
#title ⇒ Object
title of the page.
-
#uri ⇒ Object
the uri for this page.
Instance Method Summary collapse
-
#initialize(uri, title = nil, parent = nil, realm = nil) ⇒ SitePage
constructor
A new instance of SitePage.
-
#to_s ⇒ Object
Return string representation.
Constructor Details
#initialize(uri, title = nil, parent = nil, realm = nil) ⇒ SitePage
Returns a new instance of SitePage.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/n/sitemap.rb', line 54 def initialize(uri, title = nil, parent = nil, realm = nil) @uri, @title, @parent = uri, title, parent # inherit realm from parent if exists if parent and parent.realm @realm = parent.realm else @realm = realm end @children = [] @parent.children << self if parent # gmosx: is this good? # automatically add to the sitemap. $sitemap << self end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
47 48 49 |
# File 'lib/n/sitemap.rb', line 47 def children @children end |
#description ⇒ Object
description of the page
46 47 48 |
# File 'lib/n/sitemap.rb', line 46 def description @description end |
#flag ⇒ Object
Returns the value of attribute flag.
48 49 50 |
# File 'lib/n/sitemap.rb', line 48 def flag @flag end |
#level ⇒ Object
Returns the value of attribute level.
42 43 44 |
# File 'lib/n/sitemap.rb', line 42 def level @level end |
#parent ⇒ Object
Returns the value of attribute parent.
47 48 49 |
# File 'lib/n/sitemap.rb', line 47 def parent @parent end |
#real_uri ⇒ Object
the real uri to this page calculated by the page overloader)
37 38 39 |
# File 'lib/n/sitemap.rb', line 37 def real_uri @real_uri end |
#realm ⇒ Object
the realm this page belongs to, typically the part name. put symbols in this variable
52 53 54 |
# File 'lib/n/sitemap.rb', line 52 def realm @realm end |
#shader ⇒ Object
the shader for this page, overrided the shader calculated by the engine
41 42 43 |
# File 'lib/n/sitemap.rb', line 41 def shader @shader end |
#title ⇒ Object
title of the page
44 45 46 |
# File 'lib/n/sitemap.rb', line 44 def title @title end |
#uri ⇒ Object
the uri for this page
35 36 37 |
# File 'lib/n/sitemap.rb', line 35 def uri @uri end |
Instance Method Details
#to_s ⇒ Object
Return string representation
74 75 76 |
# File 'lib/n/sitemap.rb', line 74 def to_s return @title end |