Class: ActiveFedora::RDF::ValueCaster
- Inherits:
-
Object
- Object
- ActiveFedora::RDF::ValueCaster
- Defined in:
- lib/active_fedora/rdf/value_caster.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ ValueCaster
constructor
A new instance of ValueCaster.
- #value ⇒ Object
Constructor Details
#initialize(value) ⇒ ValueCaster
Returns a new instance of ValueCaster.
3 4 5 |
# File 'lib/active_fedora/rdf/value_caster.rb', line 3 def initialize(value) @value = value end |
Instance Method Details
#value ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/active_fedora/rdf/value_caster.rb', line 7 def value if @value.respond_to?(:language) # Cast RDF::Literals @value.to_s else @value end end |