Module: Bivouac
- Defined in:
- lib/bivouac.rb,
lib/bivouac/template.rb,
lib/bivouac/commands/plugin.rb
Defined Under Namespace
Modules: Filters, Template
Classes: Plugin
Constant Summary
collapse
- @@_plugins_view_helpers =
[]
- @@_plugins_controller_helpers =
[]
Instance Method Summary
collapse
Instance Method Details
#addControllerHelperModule(m) ⇒ Object
32
33
34
|
# File 'lib/bivouac.rb', line 32
def addControllerHelperModule( m )
@@_plugins_controller_helpers << m
end
|
#addViewHelperModule(m) ⇒ Object
24
25
26
|
# File 'lib/bivouac.rb', line 24
def addViewHelperModule( m )
@@_plugins_view_helpers << m
end
|
#controllerHelperModule ⇒ Object
36
37
38
|
# File 'lib/bivouac.rb', line 36
def controllerHelperModule
@@_plugins_controller_helpers
end
|
#filePath(from, *data) ⇒ Object
40
41
42
|
# File 'lib/bivouac.rb', line 40
def filePath( from, *data )
File.join File.expand_path(File.dirname(from)), data
end
|
#files(xPath, *options, &block) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/bivouac.rb', line 5
def files( xPath, *options, &block )
path = File.dirname($0) + "/" + xPath.to_s
if ENV['BIVOUAC_ROOT']
path = ENV['BIVOUAC_ROOT'] + "/app/" + xPath.to_s
end
Dir.glob("#{path}/**/*.rb").each do |file|
if options[0]
if options[0].keys.include?( :except )
if options[0][:except].include?(File.basename(file)) == false
yield( file )
end
end
else
yield( file )
end
end
end
|
#viewHelperModule ⇒ Object
28
29
30
|
# File 'lib/bivouac.rb', line 28
def viewHelperModule
@@_plugins_view_helpers
end
|