Method: RDF.Literal

Defined in:
lib/rdf.rb

.Literal(literal, **options) ⇒ RDF::Literal

Alias for ‘RDF::Literal.new`.

Parameters:

  • value (Object)
  • direction (Symbol)

    (nil) Initial text direction.

  • language (Symbol)

    (nil) Language is downcased to ensure proper matching

  • lexical (String)

    (nil) Supplied lexical representation of this literal, otherwise it comes from transforming ‘value` to a string form..

  • datatype (URI)

    (nil)

  • validate (Boolean)

    (false)

  • canonicalize (Boolean)

    (false)

Returns:



141
142
143
144
145
146
# File 'lib/rdf.rb', line 141

def self.Literal(literal, **options)
  case literal
    when RDF::Literal then literal
    else Literal.new(literal, **options)
  end
end