Class: RDF::List

Inherits:
Object
  • Object
show all
Defined in:
lib/rdf/n3/extensions.rb

Direct Known Subclasses

N3::List

Instance Method Summary collapse

Instance Method Details

#to_sxp(**options) ⇒ String

Returns an S-Expression (SXP) representation

Returns:

  • (String)


36
37
38
# File 'lib/rdf/n3/extensions.rb', line 36

def to_sxp(**options)
  to_a.to_sxp_bin.to_sxp(**options)
end

#to_sxp_binArray

Transform Statement into an SXP

Returns:

  • (Array)


28
29
30
# File 'lib/rdf/n3/extensions.rb', line 28

def to_sxp_bin
  to_a.to_sxp_bin
end

#variable?Boolean

A list is variable if any of its members are variable?

Returns:

  • (Boolean)


22
23
24
# File 'lib/rdf/n3/extensions.rb', line 22

def variable?
  to_a.any?(&:variable?)
end