Module: Gearbox::QueryableImplementation

Defined in:
lib/gearbox/mixins/queryable_implementation.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/gearbox/mixins/queryable_implementation.rb', line 3

def self.included(base)
  base.send :include, RDF::Queryable
end

Instance Method Details

#each(opts = {}, &block) ⇒ Object Also known as: each_statement

Depends on RDF::Queryable, SemanticAccessors and SubjectMethods



8
9
10
# File 'lib/gearbox/mixins/queryable_implementation.rb', line 8

def each(opts={}, &block)
  attribute_definitions.map{|name, attribute| attribute.to_rdf(self, opts)}.each(&block)
end