Method: RDF::List#last_subject

Defined in:
lib/rdf/model/list.rb

#last_subjectRDF::Resource

Returns the last subject term constituting this list.

Examples:

RDF::List[1, 2, 3].last_subject         #=> RDF::Node(...)

Returns:

Since:

  • 0.2.3



776
777
778
# File 'lib/rdf/model/list.rb', line 776

def last_subject
  each_subject.to_a.last # TODO: optimize this
end