Module: EasySparql

Defined in:
lib/easy_sparql/mock_cache.rb,
lib/easy_sparql.rb,
lib/easy_sparql/store.rb,
lib/easy_sparql/resource.rb

Overview

easy-sparql

Copyright © 2011 British Broadcasting Corporation

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Modules: ClassMethods Classes: MockCache, Resource, Store

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



39
40
41
# File 'lib/easy_sparql.rb', line 39

def self.included(base)
  base.extend(ClassMethods)
end

.queryObject



35
36
37
# File 'lib/easy_sparql.rb', line 35

def self.query
  store.sparql_client
end

.storeObject

Raises:

  • (Exception)


30
31
32
33
# File 'lib/easy_sparql.rb', line 30

def self.store
  raise Exception.new("You need to specify a store using EasySparql.store = ... before trying to access it") unless @store
  @store
end

.store=(store) ⇒ Object



26
27
28
# File 'lib/easy_sparql.rb', line 26

def self.store=(store)
  @store = store
end

Instance Method Details

#queryObject



94
95
96
# File 'lib/easy_sparql.rb', line 94

def query
  EasySparql.query
end