Class: RdfaParser::Literal::Null
Constant Summary
Constants inherited
from Encoding
Encoding::MAP
Instance Attribute Summary
Attributes inherited from Encoding
#value
Instance Method Summary
collapse
Methods inherited from Encoding
#==, coerce, #compare_contents, #encode_contents, #escape, float, #hash, #initialize, integer, #should_quote?, string, the_null_encoding, #unescape, xmlliteral
Instance Method Details
204
205
206
207
|
# File 'lib/rdfa_parser/literal.rb', line 204
def format_as_n3(content, lang)
"\"#{escape(content)}\"" + (lang ? "@#{lang}" : "")
end
|
209
210
211
212
213
214
215
|
# File 'lib/rdfa_parser/literal.rb', line 209
def format_as_trix(content, lang)
if lang
"<plainLiteral xml:lang=\"#{lang}\"\>#{content}</plainLiteral>"
else
"<plainLiteral>#{content}</plainLiteral>"
end
end
|
#inspect ⇒ Object
223
224
225
|
# File 'lib/rdfa_parser/literal.rb', line 223
def inspect
"<theReddy::TypeLiteral::Encoding::Null>"
end
|
#to_s ⇒ Object
200
201
202
|
# File 'lib/rdfa_parser/literal.rb', line 200
def to_s
''
end
|
#xml_args(content, lang) ⇒ Object
217
218
219
220
221
|
# File 'lib/rdfa_parser/literal.rb', line 217
def xml_args(content, lang)
hash = {}
hash["xml:lang"] = lang if lang
[content, hash]
end
|
#xmlliteral? ⇒ Boolean
227
228
229
|
# File 'lib/rdfa_parser/literal.rb', line 227
def xmlliteral?
false
end
|