diff options
Diffstat (limited to 'lib/xsd/codegen/commentdef.rb')
-rw-r--r-- | lib/xsd/codegen/commentdef.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/xsd/codegen/commentdef.rb b/lib/xsd/codegen/commentdef.rb new file mode 100644 index 0000000000..f98fade57d --- /dev/null +++ b/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 /^#/ =~ @comment + format(@comment) + else + format(@comment).gsub(/^/, "# ") + end + end +end + + +end +end |