Line | |
---|
1 | # XSD4R - Generating comment definition code
|
---|
2 | # Copyright (C) 2004 NAKAMURA, Hiroshi <[email protected]>.
|
---|
3 |
|
---|
4 | # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
---|
5 | # redistribute it and/or modify it under the same terms of Ruby's license;
|
---|
6 | # either the dual license version in 2003, or any later version.
|
---|
7 |
|
---|
8 |
|
---|
9 | require 'xsd/codegen/gensupport'
|
---|
10 |
|
---|
11 |
|
---|
12 | module XSD
|
---|
13 | module CodeGen
|
---|
14 |
|
---|
15 |
|
---|
16 | module CommentDef
|
---|
17 | include GenSupport
|
---|
18 |
|
---|
19 | attr_accessor :comment
|
---|
20 |
|
---|
21 | private
|
---|
22 |
|
---|
23 | def dump_comment
|
---|
24 | if /\A#/ =~ @comment
|
---|
25 | format(@comment)
|
---|
26 | else
|
---|
27 | format(@comment).gsub(/^/, '# ')
|
---|
28 | end
|
---|
29 | end
|
---|
30 | end
|
---|
31 |
|
---|
32 |
|
---|
33 | end
|
---|
34 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.