summaryrefslogtreecommitdiff
path: root/lib/WebCoso/Doc/Base.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/WebCoso/Doc/Base.pm')
-rw-r--r--lib/WebCoso/Doc/Base.pm23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/WebCoso/Doc/Base.pm b/lib/WebCoso/Doc/Base.pm
index 46afce8..ab99164 100644
--- a/lib/WebCoso/Doc/Base.pm
+++ b/lib/WebCoso/Doc/Base.pm
@@ -15,15 +15,26 @@ class WebCoso::Doc::Base {
method basename() { ... }
- submethod BUILD(:$wc,:$dir) {
+ submethod BUILD(:$!wc,:$!dir) {
my $basename = self.basename;
- $!tt = WebCoso::Maker::TT.new(:$basename,:$dir,:$wc);
- $!rst = WebCoso::Maker::RST.new(:$basename,:$dir,:$wc);
- $!xhtml = WebCoso::Maker::XHTML.new(:$basename,:$dir,:$wc);
- $!html = WebCoso::Maker::HTML.new(:$basename,:$dir,:$wc);
+ $!tt = WebCoso::Maker::TT.new(:$basename,:$!dir,:$!wc);
+ $!rst = WebCoso::Maker::RST.new(:$basename,:$!dir,:$!wc);
+ $!xhtml = WebCoso::Maker::XHTML.new(:$basename,:$!dir,:$!wc);
+ $!html = WebCoso::Maker::HTML.new(:$basename,:$!dir,:$!wc);
+ }
+
+ method make-by-ext($ext) {
+ say "Doc::Base($.dir/$.basename)::make-by-ext($ext)";
+ given $ext {
+ when 'rest.txt' { return $.tt.make() }
+ when 'du.xml' { return $.rst.make() }
+ when 'xhtml' { return $.xhtml.make() }
+ when 'html' { return $.html.make() }
+ }
}
method make() {
- $.html.get-files();
+ say "Doc::Base($.dir/$.basename)::make";
+ $.make-by-ext('html');
}
}