Class: N::Part
Overview
Part
A module of functionality in the framework
Design:
Q: Part should include Entity to allow optional runtime administration/customization ??
Instance Attribute Summary collapse
-
#body ⇒ Object
a description of the part.
-
#dependencies ⇒ Object
an array of part names this part depends on.
-
#name ⇒ Object
the (internal) name of this part.
-
#title ⇒ Object
the tile of this part (intended for humans).
-
#vendor ⇒ Object
the vendor.
-
#vendor_url ⇒ Object
url of the vendor’s homepage.
-
#version ⇒ Object
the version of this part.
Instance Method Summary collapse
-
#initialize ⇒ Part
constructor
A new instance of Part.
-
#install ⇒ Object
Install this part to the application.
-
#prepared_statements ⇒ Object
Define usefull prepared statements for this part.
-
#rewrites ⇒ Object
Define the rewrite rules for this part.
-
#roles ⇒ Object
Define the roles this part introduces.
-
#sitemap ⇒ Object
Define the pages this part introduces.
- #start ⇒ Object
- #stop ⇒ Object
- #to_s ⇒ Object
-
#unistall ⇒ Object
Uninstall this part.
Constructor Details
#initialize ⇒ Part
Returns a new instance of Part.
91 92 93 94 95 96 |
# File 'lib/n/parts.rb', line 91 def initialize sitemap() rewrites() roles() prepared_statements() end |
Instance Attribute Details
#body ⇒ Object
a description of the part
78 79 80 |
# File 'lib/n/parts.rb', line 78 def body @body end |
#dependencies ⇒ Object
an array of part names this part depends on. The named parts are automatically required when requiring this part.
87 88 89 |
# File 'lib/n/parts.rb', line 87 def dependencies @dependencies end |
#name ⇒ Object
the (internal) name of this part
74 75 76 |
# File 'lib/n/parts.rb', line 74 def name @name end |
#title ⇒ Object
the tile of this part (intended for humans)
76 77 78 |
# File 'lib/n/parts.rb', line 76 def title @title end |
#vendor ⇒ Object
the vendor
82 83 84 |
# File 'lib/n/parts.rb', line 82 def vendor @vendor end |
#vendor_url ⇒ Object
url of the vendor’s homepage.
84 85 86 |
# File 'lib/n/parts.rb', line 84 def vendor_url @vendor_url end |
#version ⇒ Object
the version of this part
80 81 82 |
# File 'lib/n/parts.rb', line 80 def version @version end |
Instance Method Details
#install ⇒ Object
Install this part to the application. Called by the application installation scripts. Typically inserts bootstrap data in the database
102 103 |
# File 'lib/n/parts.rb', line 102 def install end |
#prepared_statements ⇒ Object
Define usefull prepared statements for this part
139 140 |
# File 'lib/n/parts.rb', line 139 def prepared_statements end |
#rewrites ⇒ Object
Define the rewrite rules for this part.
128 129 |
# File 'lib/n/parts.rb', line 128 def rewrites end |
#roles ⇒ Object
Define the roles this part introduces.
133 134 |
# File 'lib/n/parts.rb', line 133 def roles end |
#sitemap ⇒ Object
Define the pages this part introduces.
123 124 |
# File 'lib/n/parts.rb', line 123 def sitemap end |
#start ⇒ Object
113 114 |
# File 'lib/n/parts.rb', line 113 def start end |
#stop ⇒ Object
118 119 |
# File 'lib/n/parts.rb', line 118 def stop end |
#to_s ⇒ Object
144 145 146 |
# File 'lib/n/parts.rb', line 144 def to_s @name end |
#unistall ⇒ Object
Uninstall this part. Typically cleans up the database.
108 109 |
# File 'lib/n/parts.rb', line 108 def unistall end |