Method: RDF::Repository#supports?

Defined in:
lib/rdf/repository.rb

#supports?(feature) ⇒ Boolean

Returns true if this respository supports the given feature.

Supported features include those from Enumerable#supports? along with the following:

  • :atomic_write supports atomic write in transaction scopes
  • :snapshots supports creation of immutable snapshots of current contents via #snapshot.

Returns:

  • (Boolean)

See Also:

[View source] [View on GitHub]

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/rdf/repository.rb', line 178

def supports?(feature)
  case feature.to_sym
  when :graph_name       then @options[:with_graph_name]
  when :inference        then false  # forward-chaining inference
  when :validity         then @options.fetch(:with_validity, true)
  when :literal_equality then true
  when :atomic_write     then false
  when :rdf_full         then false
  # FIXME: quoted triples are now deprecated
  when :quoted_triples   then false
  when :base_direction   then false
  when :snapshots        then false
  else false
  end
end