xamplr 1.3.15 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. data/.gitignore +1 -0
  2. data/COPYING +160 -656
  3. data/LICENSE +1 -1
  4. data/README.md +33 -0
  5. data/Rakefile +2 -2
  6. data/VERSION.yml +2 -2
  7. data/lib/xamplr.rb +1 -0
  8. data/lib/xamplr/iterator.rb +123 -0
  9. data/lib/xamplr/xml-text.rb +5 -5
  10. data/xamplr.gemspec +9 -204
  11. metadata +13 -203
  12. data/README.rdoc +0 -46
  13. data/README.rdoc.orig +0 -118
  14. data/bin/xampl-gen +0 -17
  15. data/docs/intro/.gitignore +0 -1
  16. data/docs/intro/example1/example1.rb +0 -6
  17. data/docs/intro/example1/xml/hello.xml +0 -1
  18. data/docs/intro/example2/example2.rb +0 -38
  19. data/docs/intro/example2/project-generator.rb +0 -22
  20. data/docs/intro/example2/xml/hello.xml +0 -2
  21. data/docs/intro/example3/example3.rb +0 -30
  22. data/docs/intro/example3/example3a.rb +0 -16
  23. data/docs/intro/example3/generated.png +0 -0
  24. data/docs/intro/example3/grab-yuml.rb +0 -10
  25. data/docs/intro/example3/greeter.rb +0 -15
  26. data/docs/intro/example3/greeting.rb +0 -9
  27. data/docs/intro/example3/project-generator.rb +0 -25
  28. data/docs/intro/example3/xml/greeter.xml +0 -6
  29. data/docs/intro/example4/example4.rb +0 -27
  30. data/docs/intro/example4/example4a.rb +0 -19
  31. data/docs/intro/example4/grab-yuml.rb +0 -10
  32. data/docs/intro/example4/greeter.rb +0 -15
  33. data/docs/intro/example4/greeting.rb +0 -9
  34. data/docs/intro/example4/project-generator.rb +0 -25
  35. data/docs/intro/example4/xml/greeter.xml +0 -6
  36. data/docs/intro/grab-yuml.rb +0 -10
  37. data/docs/intro/project-generator.rb +0 -51
  38. data/docs/intro/xampl.lyx +0 -1494
  39. data/docs/intro/xampl.pdf +0 -0
  40. data/examples/employees/final-xampl/xampl-gen.rb +0 -38
  41. data/examples/employees/final-xampl/xml/ddd-final-xampl.xml +0 -86
  42. data/examples/employees/final/xampl-gen.rb +0 -38
  43. data/examples/employees/final/xml/ddd-final.xml +0 -86
  44. data/examples/employees/first/xampl-gen.rb +0 -38
  45. data/examples/employees/first/xml/ddd-first.xml +0 -48
  46. data/examples/employees/twist/twist.graphml +0 -333
  47. data/examples/employees/twist/xampl-gen.rb +0 -38
  48. data/examples/employees/twist/xml/twist.xml +0 -90
  49. data/examples/employees/xamplr-twist.xml +0 -2
  50. data/examples/employees/yuml-diagrams/DDD-final-approach.graphml +0 -393
  51. data/examples/employees/yuml-diagrams/DDD-final-xampl-approach.graphml +0 -265
  52. data/examples/employees/yuml-diagrams/DDD-ideal-final-approach.graphml +0 -357
  53. data/examples/employees/yuml-diagrams/ddd-final.png +0 -0
  54. data/examples/employees/yuml-diagrams/ddd-final.yuml +0 -8
  55. data/examples/employees/yuml-diagrams/ddd-first.png +0 -0
  56. data/examples/employees/yuml-diagrams/ddd-first.yuml +0 -7
  57. data/examples/employees/yuml-diagrams/final-yed.png +0 -0
  58. data/examples/employees/yuml-diagrams/first-yed.png +0 -0
  59. data/examples/employees/yuml-diagrams/twist.png +0 -0
  60. data/examples/employees/yuml-diagrams/twist.yuml +0 -12
  61. data/examples/employees/yuml-diagrams/xamplr-final-no-mixins.png +0 -0
  62. data/examples/employees/yuml-diagrams/xamplr-final-simplified.png +0 -0
  63. data/examples/employees/yuml-diagrams/xamplr-final-with-mixins.png +0 -0
  64. data/examples/employees/yuml-diagrams/yuml-simplified.txt +0 -19
  65. data/examples/employees/yuml-diagrams/yuml-with-mixins.txt +0 -53
  66. data/examples/employees/yuml-diagrams/yuml.txt +0 -27
  67. data/examples/hobbies/Makefile +0 -5
  68. data/examples/hobbies/hobbies.rb +0 -193
  69. data/examples/hobbies/project-generator.rb +0 -25
  70. data/examples/hobbies/xampl-gen.rb +0 -38
  71. data/examples/hobbies/xml/hobby.xml +0 -3
  72. data/examples/hobbies/xml/people.xml +0 -5
  73. data/examples/random-people-shared-addresses/.gitignore +0 -2
  74. data/examples/random-people-shared-addresses/Makefile +0 -15
  75. data/examples/random-people-shared-addresses/batch-load-users-profiled.rb +0 -91
  76. data/examples/random-people-shared-addresses/batch-load-users-safe.rb +0 -81
  77. data/examples/random-people-shared-addresses/batch-load-users.rb +0 -79
  78. data/examples/random-people-shared-addresses/find-mentions.rb +0 -47
  79. data/examples/random-people-shared-addresses/find-people-by-address.rb +0 -104
  80. data/examples/random-people-shared-addresses/optimise.rb +0 -16
  81. data/examples/random-people-shared-addresses/people.rb +0 -35
  82. data/examples/random-people-shared-addresses/query.rb +0 -75
  83. data/examples/random-people-shared-addresses/query2.rb +0 -73
  84. data/examples/random-people-shared-addresses/random-names.csv +0 -10000
  85. data/examples/random-people-shared-addresses/settings.rb +0 -3
  86. data/examples/random-people-shared-addresses/what-to-query-on.rb +0 -82
  87. data/examples/random-people-shared-addresses/xampl-gen.rb +0 -38
  88. data/examples/random-people-shared-addresses/xml/people.xml +0 -14
  89. data/examples/random-people/.gitignore +0 -2
  90. data/examples/random-people/Makefile +0 -20
  91. data/examples/random-people/batch-load-users.rb +0 -61
  92. data/examples/random-people/optimise.rb +0 -16
  93. data/examples/random-people/people.rb +0 -22
  94. data/examples/random-people/query.rb +0 -73
  95. data/examples/random-people/query2.rb +0 -73
  96. data/examples/random-people/random-names.csv +0 -10000
  97. data/examples/random-people/rawtc.rb +0 -91
  98. data/examples/random-people/settings.rb +0 -3
  99. data/examples/random-people/what-to-query-on.rb +0 -80
  100. data/examples/random-people/xampl-gen.rb +0 -39
  101. data/examples/random-people/xml/people.xml +0 -11
  102. data/examples/read-testing/.gitignore +0 -2
  103. data/examples/read-testing/Makefile +0 -10
  104. data/examples/read-testing/load.rb +0 -65
  105. data/examples/read-testing/read.rb +0 -51
  106. data/examples/read-testing/rrr.rb +0 -88
  107. data/examples/read-testing/settings.rb +0 -2
  108. data/examples/read-testing/xampl-gen.rb +0 -38
  109. data/examples/read-testing/xml/text.xml +0 -8
  110. data/examples/tokyo-cabinet-experimental/.gitignore +0 -2
  111. data/examples/tokyo-cabinet-experimental/expt-query.rb +0 -42
  112. data/examples/tokyo-cabinet-experimental/expt-query2.rb +0 -42
  113. data/examples/tokyo-cabinet-experimental/expt-query3.rb +0 -41
  114. data/examples/tokyo-cabinet-experimental/expt-reader.rb +0 -32
  115. data/examples/tokyo-cabinet-experimental/expt.rb +0 -61
  116. data/examples/tokyo-cabinet-experimental/xampl-gen.rb +0 -38
  117. data/examples/tokyo-cabinet-experimental/xml/tcx.xml +0 -6
  118. data/examples/write-testing/README +0 -4
  119. data/examples/write-testing/RESULTS.home +0 -33
  120. data/examples/write-testing/RESULTS.raconteur +0 -33
  121. data/examples/write-testing/write-speed-test.rb +0 -40
  122. data/lib/xampl-generator.rb +0 -3
  123. data/lib/xamplr-generator.rb +0 -9
  124. data/lib/xamplr/gen-elements.xml +0 -6230
  125. data/lib/xamplr/gen.elements.xml +0 -108
  126. data/lib/xamplr/generate-elements.rb +0 -15
  127. data/lib/xamplr/generator.rb +0 -5
  128. data/lib/xamplr/graphml-out.rb +0 -451
  129. data/lib/xamplr/handwritten/example.rb +0 -698
  130. data/lib/xamplr/handwritten/hand-example.rb +0 -533
  131. data/lib/xamplr/handwritten/test-handwritten.rb +0 -873
  132. data/lib/xamplr/my.gen.elements.xml +0 -461
  133. data/lib/xamplr/obsolete/fsdb.rb +0 -62
  134. data/lib/xamplr/simpleTemplate/danger.rx +0 -4
  135. data/lib/xamplr/simpleTemplate/obsolete/input-c.r4 +0 -35
  136. data/lib/xamplr/simpleTemplate/obsolete/play.r6.txt +0 -12
  137. data/lib/xamplr/simpleTemplate/obsolete/play_more.r6.txt +0 -20
  138. data/lib/xamplr/simpleTemplate/obsolete/test001.r5 +0 -8
  139. data/lib/xamplr/simpleTemplate/obsolete/test002.r5 +0 -13
  140. data/lib/xamplr/simpleTemplate/obsolete/test003.r5 +0 -37
  141. data/lib/xamplr/simpleTemplate/old/r6.000.rb +0 -122
  142. data/lib/xamplr/simpleTemplate/old/r6.001.rb +0 -145
  143. data/lib/xamplr/simpleTemplate/play.r6 +0 -12
  144. data/lib/xamplr/simpleTemplate/play_more.r6 +0 -20
  145. data/lib/xamplr/simpleTemplate/play_noblanks.r6 +0 -21
  146. data/lib/xamplr/simpleTemplate/playq.r6 +0 -16
  147. data/lib/xamplr/simpleTemplate/r6.rb +0 -87
  148. data/lib/xamplr/simpleTemplate/simple-template.rb +0 -75
  149. data/lib/xamplr/templates/.cvsignore +0 -3
  150. data/lib/xamplr/templates/child.template +0 -47
  151. data/lib/xamplr/templates/child_indexed.template +0 -89
  152. data/lib/xamplr/templates/child_modules.template +0 -5
  153. data/lib/xamplr/templates/element_classes.template +0 -11
  154. data/lib/xamplr/templates/element_data.template +0 -283
  155. data/lib/xamplr/templates/element_empty.template +0 -277
  156. data/lib/xamplr/templates/element_mixed.template +0 -278
  157. data/lib/xamplr/templates/element_simple.template +0 -277
  158. data/lib/xamplr/templates/package.template +0 -38
  159. data/lib/xamplr/xampl-cl-gen.rb +0 -89
  160. data/lib/xamplr/xampl-generator.rb +0 -569
  161. data/lib/xamplr/xampl-hand-generated.rb +0 -1535
  162. data/lib/xamplr/yEd-sample.graphml +0 -300
  163. data/lib/xamplr/yuml-out.rb +0 -129
@@ -1,62 +0,0 @@
1
- module Xampl
2
-
3
- require "fileutils"
4
- require "fsdb"
5
- require "xamplr/persister/caching"
6
-
7
- class FSDBPersister < AbstractCachingPersister
8
-
9
- def initialize(name=nil, format=nil, root=File.join(".", "repo-fsdb"))
10
- super(root, name, format)
11
-
12
- @db = FSDB::Database[@root_dir]
13
- @db_lock = "lock"
14
- @db[@db_lock] = @db_lock
15
- end
16
-
17
- def FSDBPersister.kind
18
- :fsdb
19
- end
20
-
21
- def kind
22
- FSDBPersister.kind
23
- end
24
-
25
- def rollback_cleanup
26
- super
27
- @db.clear_cache
28
- end
29
-
30
- def do_sync_write
31
- @db.edit(@db_lock){ | lock |
32
- @changed.each { | xampl, ignore | write(xampl) }
33
- }
34
- end
35
-
36
- def place_name(klass, id, type=".txt")
37
- place = File.join(klass.name.split("::"), "#{id}#{type}")
38
- return place
39
- end
40
-
41
- def write(xampl)
42
- raise XamplException.new(:no_index_so_no_persist) unless xampl.get_the_index
43
- #return false unless xampl.get_the_index
44
-
45
- place = place_name(xampl.class, xampl.get_the_index)
46
- @db[place] = represent(xampl)
47
-
48
- @write_count = @write_count + 1
49
- xampl.changes_accepted
50
- return true
51
- end
52
-
53
- def read_representation(klass, pid)
54
- place = place_name(klass, pid)
55
- representation = @db.edit(@db_lock){ | lock | @db[place] }
56
- return representation
57
- end
58
- end
59
-
60
- Xampl.register_persister_kind(FSDBPersister)
61
- end
62
-
@@ -1,4 +0,0 @@
1
-
2
- | system("ls -lt")
3
-
4
- hello there
@@ -1,35 +0,0 @@
1
- |
2
- | fields = %w( foo bar foobar barfoo )
3
- |
4
- | macro('field'){|name| "int #{ name };" }
5
- |
6
- | macro('setter') do |name|
7
- | <<-c
8
- | int set_#{ name }(self, value)
9
- | object * self;
10
- | int value;
11
- | {
12
- | return( self->#{ name } = value );
13
- | }
14
- | c
15
- | end
16
- |
17
- | macro('getter') do |name|
18
- | <<-c
19
- | int get_#{ name }(self)
20
- | object * self;
21
- | {
22
- | return( self->#{ name } );
23
- | }
24
- | c
25
- | end
26
-
27
- struct object {
28
- |
29
- | fields.each{|f| field f}
30
- |
31
- };
32
-
33
- |
34
- | fields.each{|f| setter(f); getter(f); }
35
- |
@@ -1,12 +0,0 @@
1
- |
2
- | some_number = 42
3
- | def gen_some_number
4
- | 42 + rand
5
- | end
6
- |
7
-
8
- Hello there (play)! #{@message}
9
-
10
- some number: [[[#{some_number}]]]
11
- gen some number: [[[#{gen_some_number}]]]
12
- play __________________________________________________________
@@ -1,20 +0,0 @@
1
- |
2
- | some_number = 42
3
- | def gen_some_number
4
- | 42 + rand
5
- | end
6
- |
7
-
8
- Hello there(play_more)! #{@message}
9
-
10
- |
11
- | another_number = 99
12
- | result << play()
13
- |
14
-
15
- some number: [[[#{some_number}]]]
16
- gen some number: [[[#{gen_some_number}]]]
17
- another number: [[[#{another_number}]]]
18
-
19
- play again:... #{play}
20
- play_more _____________________________________________________
@@ -1,8 +0,0 @@
1
- |
2
- | some_number = 42
3
- |
4
-
5
- Hello there!
6
-
7
- some number1: [[[#{some_number}]]]
8
-
@@ -1,13 +0,0 @@
1
- |
2
- | some_number = 42
3
- | def gen_some_number
4
- | 42 + rand
5
- | end
6
- |
7
-
8
- Hello there!
9
-
10
- some number: [[[#{some_number}]]]
11
- gen some number: [[[#{gen_some_number}]]]
12
-
13
-
@@ -1,37 +0,0 @@
1
- |
2
- | fields = %w( foo bar foobar barfoo )
3
- |
4
- | macro('field'){|name| "int #{ name };" }
5
- |
6
- | macro('setter') do |name|
7
- | <<-c
8
- | int set_#{ name }(self, value)
9
- | object * self;
10
- | int value;
11
- | {
12
- | return( self->#{ name } = value );
13
- | }
14
- | c
15
- | end
16
- |
17
- | macro('getter') do |name|
18
- | <<-c
19
- | int get_#{ name }(self)
20
- | object * self;
21
- | {
22
- | return( self->#{ name } );
23
- | }
24
- | c
25
- | end
26
-
27
- struct object {
28
- |
29
- | fields.each{|f| field f}
30
- |
31
- };
32
-
33
- |
34
- | fields.each{|f| setter(f); getter(f); }
35
- |
36
-
37
-
@@ -1,122 +0,0 @@
1
- #! /usr/bin/env ruby
2
- module TemplateEngine
3
- attr_accessor :files
4
-
5
- def macro(name, &block)
6
- Kernel.send(:define_method, name) { |*args|
7
- puts block.call(args)
8
- }
9
- end
10
-
11
- def build_script(template_file_name, method_name)
12
-
13
- # Build the definition of a method (called 'method_name') that
14
- # will execute the template (in the file 'template_file_name'). There will
15
- # be an optional argument that defaults to the empty string (and so this
16
- # method will, by default, build a new string representing the result). If
17
- # the argument is supplied, it must respond to the "<<" (append) method.
18
- #
19
- # The result variable is available in the template. To write to the result
20
- # from Ruby code, result << sprintf("hello %s", "world") in the template
21
- # will get its output where expected.
22
-
23
- File.open(template_file_name) do | file |
24
- r = "
25
- def #{method_name}(result=\"\")
26
- tmp = ""
27
- result << \"\"
28
- "
29
- while line = file.gets
30
- if line[0] == ?|
31
- r << " #{line[1..-1]}"
32
- else
33
- r << " result << \"#{line.chomp.gsub("\"", "\\\"")}\\n\"\n"
34
- end
35
- end
36
- r << "
37
- result
38
- end
39
- "
40
- end
41
- end
42
-
43
- def compile_scripts()
44
- files.each { | script_name |
45
- method_name = File::basename(script_name, ".*")
46
- the_script = build_script(script_name, method_name)
47
- puts the_script
48
- instance_eval the_script
49
- }
50
- end
51
- end
52
-
53
- ###
54
- ### and this is how it can be used...
55
- ###
56
-
57
- # Define a class to hold the template methods. There is an attribute 'message'
58
- # that can be set by the program invoking the template, and referred to by the
59
- # templates.
60
-
61
- class R6_Template
62
- include TemplateEngine
63
- attr_accessor :message
64
- end
65
-
66
- # Assume that the command line arguments are all specifying the names of a
67
- # template file. Open the file and pass it to the build script method. When
68
- # the script is built, 'eval' it.
69
-
70
- engine = R6_Template.new
71
- engine.files = [ "play.r6", "play_more.r6", "playq.r6"];
72
- engine.compile_scripts
73
-
74
- exit
75
-
76
- # For illustrative purposes, go over the command line arguments and execute
77
- # the corresponding method defined above.
78
-
79
- engine.files.each { | script_name |
80
- method_name = File::basename(script_name, ".*")
81
- engine.message = sprintf("this is script '%s'", method_name)
82
- puts "#{method_name}*******************"
83
- what = engine.send(method_name);
84
- puts "{{{#{what}}}}*******************"
85
- }
86
-
87
- # This time call the play method directly. There must be a template
88
- # called 'play' (sans extenstion) for this to work.
89
-
90
- engine.message = "this is script 'play' -- called explicitly"
91
- puts "!!play!!*******************"
92
- what = engine.play()
93
- puts "{{{#{what}}}}*******************"
94
-
95
- # Now do the same thing as the illustrative loop above but writing to a file
96
- # with the script name and a ".out" extension.
97
-
98
- engine.files.each { | script_name |
99
- method_name = File::basename(script_name, ".*")
100
- engine.message = sprintf("this is script '%s'", method_name)
101
- File.open(sprintf("%s.out", method_name), "w") { | file |
102
- engine.send(method_name, file);
103
- }
104
- }
105
-
106
- # Write to a file called "play-x.out", again, there must be a play template
107
- # defined.
108
-
109
- engine.message = "this is script 'play' -- called explicitly"
110
- File.open("play-x.out", "w") { | file |
111
- engine.play(file)
112
- }
113
-
114
- # Build up a single string by applying all the templates
115
- long_string = ""
116
- engine.files.each { | script_name |
117
- method_name = File::basename(script_name, ".*")
118
- engine.message = sprintf("this is script '%s'", method_name)
119
- what = engine.send(method_name, long_string);
120
- }
121
- puts "!!{{{#{long_string}}}}!!*******************"
122
-
@@ -1,145 +0,0 @@
1
- #! /usr/bin/env ruby
2
-
3
- module TemplateEngine
4
- attr_accessor :method_to_file_name, :file_name_to_method
5
-
6
- def initialize
7
- @method_to_file_name = Hash.new()
8
- @file_name_to_method = Hash.new()
9
- end
10
-
11
- # def macro(name, &block)
12
- # Kernel.send(:define_method, name) { |*args|
13
- # puts block.call(args)
14
- # }
15
- # end
16
-
17
- def build_script(template_file_name, method_name)
18
-
19
- # Build the definition of a method (called 'method_name') that
20
- # will execute the template (in the file 'template_file_name'). There will
21
- # be an optional argument that defaults to the empty string (and so this
22
- # method will, by default, build a new string representing the result). If
23
- # the argument is supplied, it must respond to the "<<" (append) method.
24
- #
25
- # The result variable is available in the template. To write to the result
26
- # from Ruby code, result << sprintf("hello %s", "world") in the template
27
- # will get its output where expected.
28
-
29
- File.open(template_file_name) do | file |
30
- tmp = ""
31
- r = "
32
- def #{method_name}(result=\"\")
33
- result << \"\"
34
- "
35
- while line = file.gets
36
- if line[0] == ?|
37
- if (0 < tmp.length)
38
- r << " result << \"#{tmp.gsub("\"", "\\\"")}\""
39
- tmp = ""
40
- end
41
- r << " #{line[1..-1]}"
42
- else
43
- #tmp << line.chomp << "\n"
44
- tmp << line
45
- end
46
- end
47
- r << " result << \"#{tmp.gsub("\"", "\\\"")}\""
48
- r << "
49
- result
50
- end
51
- "
52
- end
53
- end
54
-
55
- def compile_scripts(files)
56
- files.each { | script_name |
57
- method_name = File::basename(script_name, ".*")
58
-
59
- method_to_file_name[method_name] = script_name;
60
- file_name_to_method[script_name] = method_name;
61
-
62
- the_script = build_script(script_name, method_name)
63
- puts the_script
64
- instance_eval the_script
65
- }
66
- end
67
- end
68
-
69
- ###
70
- ### and this is how it can be used...
71
- ###
72
-
73
- # Define a class to hold the template methods. There is an attribute 'message'
74
- # that can be set by the program invoking the template, and referred to by the
75
- # templates.
76
-
77
- class R6_Template
78
- include TemplateEngine
79
- attr_accessor :message
80
- end
81
-
82
- # Assume that the command line arguments are all specifying the names of a
83
- # template file. Open the file and pass it to the build script method. When
84
- # the script is built, 'eval' it.
85
-
86
- files = [ "play.r6", "play_more.r6", "playq.r6", "play_noblanks.r6"];
87
-
88
- engine = R6_Template.new
89
- engine.compile_scripts(files)
90
-
91
- # For illustrative purposes, go over the command line arguments and execute
92
- # the corresponding method defined above.
93
-
94
- files.each { | script_name |
95
- method_name = File::basename(script_name, ".*")
96
- engine.message = sprintf("this is script '%s'", method_name)
97
- puts "#{method_name}*******************"
98
- what = engine.send(method_name);
99
- puts "{{{#{what}}}}*******************"
100
- }
101
-
102
- # This time call the play method directly. There must be a template
103
- # called 'play' (sans extenstion) for this to work.
104
-
105
- engine.message = "this is script 'play' -- called explicitly"
106
- puts "!!play!!*******************"
107
- what = engine.play()
108
- puts "{{{#{what}}}}*******************"
109
-
110
- # Now do the same thing as the illustrative loop above but writing to a file
111
- # with the script name and a ".out" extension.
112
-
113
- files.each { | script_name |
114
- method_name = File::basename(script_name, ".*")
115
- engine.message = sprintf("this is script '%s'", method_name)
116
- File.open(sprintf("%s.out", method_name), "w") { | file |
117
- engine.send(method_name, file);
118
- }
119
- }
120
-
121
- # Write to a file called "play-x.out", again, there must be a play template
122
- # defined.
123
-
124
- engine.message = "this is script 'play' -- called explicitly"
125
- File.open("play-x.out", "w") { | file |
126
- engine.play(file)
127
- }
128
-
129
- # Build up a single string by applying all the templates
130
- long_string = ""
131
- files.each { | script_name |
132
- method_name = File::basename(script_name, ".*")
133
- engine.message = sprintf("this is script '%s'", method_name)
134
- what = engine.send(method_name, long_string);
135
- }
136
- puts "!!{{{#{long_string}}}}!!*******************"
137
-
138
- # This will fail, because the template methods are only defined on the
139
- # instance of the engine that compiled them.
140
- #
141
- #engine2 = R6_Template.new
142
- #engine2.message = "this is script 'play' -- called explicitly"
143
- #File.open("play-x.out", "w") { | file |
144
- # engine2.play(file)
145
- #}