Method: RDF::Repository#initialize
- Defined in:
- lib/rdf/repository.rb
permalink #initialize(uri: nil, title: nil, **options) {|repository| ... } ⇒ Repository
Initializes this repository instance.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/rdf/repository.rb', line 151 def initialize(uri: nil, title: nil, **, &block) @options = {with_graph_name: true, with_validity: true}.merge() @uri = uri @title = title # Provide a default in-memory implementation: send(:extend, Implementation) if self.class.equal?(RDF::Repository) @tx_class ||= @options.delete(:transaction_class) { DEFAULT_TX_CLASS } if block_given? case block.arity when 1 then block.call(self) else instance_eval(&block) end end end |