diff options
Diffstat (limited to 'ruby_1_8_5/lib/xsd/codegen/commentdef.rb')
-rw-r--r-- | ruby_1_8_5/lib/xsd/codegen/commentdef.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ruby_1_8_5/lib/xsd/codegen/commentdef.rb b/ruby_1_8_5/lib/xsd/codegen/commentdef.rb new file mode 100644 index 0000000000..c9493a1363 --- /dev/null +++ b/ruby_1_8_5/lib/xsd/codegen/commentdef.rb @@ -0,0 +1,34 @@ +# XSD4R - Generating comment definition code +# Copyright (C) 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' + + +module XSD +module CodeGen + + +module CommentDef + include GenSupport + + attr_accessor :comment + +private + + def dump_comment + if /\A#/ =~ @comment + format(@comment) + else + format(@comment).gsub(/^/, '# ') + end + end +end + + +end +end |