Class: FileTypeJava
- Inherits:
-
FileType
show all
- Includes:
- Singleton
- Defined in:
- lib/ontomde-core/fileTypes.rb
Instance Attribute Summary
Attributes inherited from FileType
#re_begin, #re_end
Instance Method Summary
collapse
Methods inherited from FileType
#beginMarkerSkip, #endMarkerSkip, #escape, getFileType, #unescape
Constructor Details
#initialize(ext = '.java') ⇒ FileTypeJava
Returns a new instance of FileTypeJava.
53
54
55
56
57
|
# File 'lib/ontomde-core/fileTypes.rb', line 53
def initialize(ext='.java')
super(ext)
@re_begin=Regexp.new(/^[ \t]*\/\*[ _]*XMDA[ _]BEGIN[ _]+reverse="(.*)"[ _]uri="(.*)"[ _]*\*\//)
@re_end=Regexp.new(/^[ \t]*\/\*[ _]*XMDA[ _]END[ _]+uri="(.*)"[ _]*\*\//)
end
|
Instance Method Details
#beginMarker(uri, reverse) ⇒ Object
66
67
68
|
# File 'lib/ontomde-core/fileTypes.rb', line 66
def beginMarker(uri,reverse)
return %{\n/*XMDA_BEGIN_reverse="#{reverse ? 'yes':'no'}"_#{}uri="#{uri}"_*/\n}
end
|
#endMarker(uri) ⇒ Object
69
70
71
|
# File 'lib/ontomde-core/fileTypes.rb', line 69
def endMarker(uri)
return %{\n/*XMDA_END_#{}uri="#{uri}"_*/\n}
end
|
61
62
63
64
65
|
# File 'lib/ontomde-core/fileTypes.rb', line 61
def
return ''
end
|
58
59
60
|
# File 'lib/ontomde-core/fileTypes.rb', line 58
def (str,writer)
writer.write("/* #{str} */")
end
|