Class: FileTypeJSP
- 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 = '.jsp') ⇒ FileTypeJSP
Returns a new instance of FileTypeJSP.
132
133
134
135
136
|
# File 'lib/ontomde-core/fileTypes.rb', line 132
def initialize(ext='.jsp')
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
145
146
147
|
# File 'lib/ontomde-core/fileTypes.rb', line 145
def beginMarker(uri,reverse)
return %{\n<%--_XMDA_BEGIN_reverse="#{reverse ? 'yes':'no'}"_#{}uri="#{uri}"_--%>\n}
end
|
#endMarker(uri) ⇒ Object
148
149
150
|
# File 'lib/ontomde-core/fileTypes.rb', line 148
def endMarker(uri)
return %{\n<%--_XMDA_END_#{}uri="#{uri}"_--%>\n}
end
|
140
141
142
143
144
|
# File 'lib/ontomde-core/fileTypes.rb', line 140
def
return ''
end
|
137
138
139
|
# File 'lib/ontomde-core/fileTypes.rb', line 137
def (str,writer)
writer.write("<%-- #{str} --%>")
end
|