Class: N::SitePage
Overview
A single page in the page map.
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.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/nitro/ui/sitemap.rb', line 33 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.
26 27 28 |
# File 'lib/nitro/ui/sitemap.rb', line 26 def children @children end |
#description ⇒ Object
description of the page
25 26 27 |
# File 'lib/nitro/ui/sitemap.rb', line 25 def description @description end |
#flag ⇒ Object
Returns the value of attribute flag.
27 28 29 |
# File 'lib/nitro/ui/sitemap.rb', line 27 def flag @flag end |
#level ⇒ Object
Returns the value of attribute level.
21 22 23 |
# File 'lib/nitro/ui/sitemap.rb', line 21 def level @level end |
#parent ⇒ Object
Returns the value of attribute parent.
26 27 28 |
# File 'lib/nitro/ui/sitemap.rb', line 26 def parent @parent end |
#real_uri ⇒ Object
the real uri to this page calculated by the page overloader)
15 16 17 |
# File 'lib/nitro/ui/sitemap.rb', line 15 def real_uri @real_uri end |
#realm ⇒ Object
the realm this page belongs to, typically the part name. put symbols in this variable
17 18 19 |
# File 'lib/nitro/ui/sitemap.rb', line 17 def realm @realm end |
#shader ⇒ Object
the shader for this page, overrided the shader calculated by the engine
20 21 22 |
# File 'lib/nitro/ui/sitemap.rb', line 20 def shader @shader end |
#title ⇒ Object
title of the page
23 24 25 |
# File 'lib/nitro/ui/sitemap.rb', line 23 def title @title end |
#uri ⇒ Object
the uri for this page
13 14 15 |
# File 'lib/nitro/ui/sitemap.rb', line 13 def uri @uri end |
Instance Method Details
#to_s ⇒ Object
Return string representation
53 54 55 |
# File 'lib/nitro/ui/sitemap.rb', line 53 def to_s return @title end |