5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/waves/layers/mvc.rb', line 5
def self.included( app )
require 'waves/layers/mvc/extensions'
require 'waves/layers/mvc/controllers'
require 'hoshi'
require 'waves/helpers/basic'
require 'waves/helpers/formatting'
require 'waves/helpers/form'
app.auto_create_module( :Models ) do
auto_create_class :Default
auto_load :Default, :directories => [ :models ]
auto_create_class true, :Default
auto_load true, :directories => [ :models ]
end
app.auto_create_module( :Views ) do
auto_create_class :Default, Hoshi::View[:html4] do
include Waves::Views::Mixin
include Waves::Helpers::Basic
include Waves::Helpers::Formatting
include Waves::Helpers::Form
end
auto_create_class :Templated do
include Waves::Views::Mixin
include Waves::Views::Templated
end
auto_load :Default, :directories => [ :views ]
auto_create_class true, :Default
auto_load true, :directories => [ :views ]
end
app.auto_create_module( :Controllers ) do
auto_create_class :Default, Waves::Controllers::Base
auto_load :Default, :directories => [ :controllers ]
auto_create_class true, :Default
auto_load true, :directories => [ :controllers ]
end
app.auto_create_module( :Helpers ) do
auto_create_module( :Default )
auto_load :Default, :directories => [ :helpers ]
auto_create_module( true ) { include app::Helpers::Default }
auto_load true, :directories => [ :helpers ]
end
end
|