Class: N::Part

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/n/parts.rb

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

Instance Method Summary collapse

Constructor Details

#initializePart

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

#bodyObject

a description of the part



78
79
80
# File 'lib/n/parts.rb', line 78

def body
  @body
end

#dependenciesObject

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

#nameObject

the (internal) name of this part



74
75
76
# File 'lib/n/parts.rb', line 74

def name
  @name
end

#titleObject

the tile of this part (intended for humans)



76
77
78
# File 'lib/n/parts.rb', line 76

def title
  @title
end

#vendorObject

the vendor



82
83
84
# File 'lib/n/parts.rb', line 82

def vendor
  @vendor
end

#vendor_urlObject

url of the vendor’s homepage.



84
85
86
# File 'lib/n/parts.rb', line 84

def vendor_url
  @vendor_url
end

#versionObject

the version of this part



80
81
82
# File 'lib/n/parts.rb', line 80

def version
  @version
end

Instance Method Details

#installObject

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_statementsObject

Define usefull prepared statements for this part



139
140
# File 'lib/n/parts.rb', line 139

def prepared_statements
end

#rewritesObject

Define the rewrite rules for this part.



128
129
# File 'lib/n/parts.rb', line 128

def rewrites
end

#rolesObject

Define the roles this part introduces.



133
134
# File 'lib/n/parts.rb', line 133

def roles
end

#sitemapObject

Define the pages this part introduces.



123
124
# File 'lib/n/parts.rb', line 123

def sitemap
end

#startObject



113
114
# File 'lib/n/parts.rb', line 113

def start
end

#stopObject



118
119
# File 'lib/n/parts.rb', line 118

def stop
end

#to_sObject



144
145
146
# File 'lib/n/parts.rb', line 144

def to_s
	@name
end

#unistallObject

Uninstall this part. Typically cleans up the database.



108
109
# File 'lib/n/parts.rb', line 108

def unistall
end