Sha256: 7d6ba5033a227705e800c621a15dde138420bf1b01ed166bb04b544fa491df40

Contents?: true

Size: 796 Bytes

Versions: 3

Compression:

Stored size: 796 Bytes

Contents

# Copyright © 2012 The Pennsylvania State University
#
# 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
#
# http://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.

# -*- encoding : utf-8 -*-
module Sufia
  module SolrDocumentBehavior
    def title_or_label
      self['desc_metadata__title_display'] ? 'desc_metadata__title_display' : 'label_t'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sufia-0.1.0 lib/sufia/solr_document_behavior.rb
sufia-0.0.8 lib/sufia/solr_document_behavior.rb
sufia-0.0.7 lib/sufia/solr_document_behavior.rb