Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ontomde-java/vmware/vso.rb,
lib/ontomde-java/java/javadoc.rb,
lib/ontomde-java/struts/mappingToJavaHierarchy.rb
Constant Summary collapse
- JAVA_ESCAPEJAVADOC_RE =
/\*\\/
Instance Method Summary collapse
- #java_stringEscape ⇒ Object
-
#java_writeJavadoc(res) ⇒ Object
write string as javadoc NOTE: source strings should not include javadoc comments open/close (javadoc comments open/closed are removed).
- #tab ⇒ Object
Instance Method Details
#java_stringEscape ⇒ Object
98 99 100 |
# File 'lib/ontomde-java/struts/mappingToJavaHierarchy.rb', line 98 def java_stringEscape return self.gsub(/\\/,'\\\\\\\\') end |
#java_writeJavadoc(res) ⇒ Object
write string as javadoc NOTE: source strings should not include javadoc comments open/close
(javadoc comments open/closed are removed)
8 9 10 11 12 13 14 15 |
# File 'lib/ontomde-java/java/javadoc.rb', line 8 def java_writeJavadoc(res) # replace escaped carriage return by true carriage return # remove java comments (we are already inside a javadoc) self.gsub(/\\r\\n/,"\n").gsub(/\*\//,'--').gsub(/\/\*/,'--').each { |line| res.write("\t * #{line}".tr("\n"," ").rstrip) res.write("\n") } end |
#tab ⇒ Object
304 305 306 |
# File 'lib/ontomde-java/vmware/vso.rb', line 304 def tab return self+' ' end |