Sha256: d536ea5391ce65fd98af8365b47b96b1ab6d8a276bdf46ee4ad07af350600cec

Contents?: true

Size: 249 Bytes

Versions: 46

Compression:

Stored size: 249 Bytes

Contents

module ActiveFedora::RDF
  class ValueCaster
    def initialize(value)
      @value = value
    end

    def value
      if @value.respond_to?(:language) # Cast RDF::Literals
        @value.to_s
      else
        @value
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
active-fedora-11.1.4 lib/active_fedora/rdf/value_caster.rb
active-fedora-11.1.3 lib/active_fedora/rdf/value_caster.rb
active-fedora-11.1.2 lib/active_fedora/rdf/value_caster.rb
active-fedora-11.1.1 lib/active_fedora/rdf/value_caster.rb
active-fedora-11.1.0 lib/active_fedora/rdf/value_caster.rb
active-fedora-11.0.1 lib/active_fedora/rdf/value_caster.rb