Sha256: d65d9d36f50d7655e434fb8e70c35e8e2f98e5cdd9ad72cad67bd6aba6cbace2
Contents?: true
Size: 730 Bytes
Versions: 15
Compression:
Stored size: 730 Bytes
Contents
class SearchResult extend Forwardable def_delegators :@result_object, :build_search_result_rdf, :owner, :target, :value, :label, :rdf_namespace, :rdf_predicate def initialize(result_object) @result_object = result_object end def model_name @result_object.class.model_name end def search_result_partial_name @result_object.class.search_result_partial_name end def language if @result_object.is_a?(Labeling::Base) @result_object.target.try(:language) else @result_object.try(:language) end end def to_s if @result_object.is_a?(Labeling::Base) @result_object.target.value else @result_object.try(:owner).try(:pref_label).to_s end end end
Version data entries
15 entries across 15 versions & 1 rubygems