Module: Iqvoc::Rankable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/iqvoc/rankable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#build_rdf(document, subject) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/iqvoc/rankable.rb', line 7 def build_rdf(document, subject) super if self.class.rankable? predicate = "ranked#{rdf_predicate.titleize}" subject.Schema.build_predicate(predicate) do |blank_node| blank_node.Schema.relationWeight(rank) blank_node.Schema.relationTarget(IqRdf.build_uri(target.origin)) end end end |