Sha256: 2c3abb2f42d70115c6b520aff3652596a517fd17ec784938ec22e34e1ec093de

Contents?: true

Size: 440 Bytes

Versions: 12

Compression:

Stored size: 440 Bytes

Contents

class ModsDisplay::Location < ModsDisplay::Field

  private

  def displayLabel(element)
    super(element) || location_label(element) || "Location"
  end

  def location_label(element)
    if element.attributes["type"].respond_to?(:value) && location_labels.has_key?(element.attributes["type"].value)
      location_labels[element.attributes["type"].value]
    end
  end

  def location_labels
    {"repository" => "Repository"}
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mods_display-0.1.3 lib/mods_display/fields/location.rb
mods_display-0.1.2 lib/mods_display/fields/location.rb
mods_display-0.1.1 lib/mods_display/fields/location.rb
mods_display-0.1.0 lib/mods_display/fields/location.rb
mods_display-0.0.5 lib/mods_display/fields/location.rb
mods_display-0.0.4 lib/mods_display/fields/location.rb
mods_display-0.0.3 lib/mods_display/fields/location.rb
mods_display-0.0.2 lib/mods_display/fields/location.rb
mods_display-0.0.1 lib/mods_display/fields/location.rb
mods_display-0.0.1.beta6 lib/mods_display/fields/location.rb
mods_display-0.0.1.beta5 lib/mods_display/fields/location.rb
mods_display-0.0.1.beta4 lib/mods_display/fields/location.rb