Class: Valkyrie::Persistence::Postgres::ORMConverter::RDFMetadata::EnumeratorValue

Inherits:
ValueMapper
  • Object
show all
Defined in:
lib/valkyrie/persistence/postgres/orm_converter.rb

Overview

Handles iterating over arrays of values and converting each value.

Instance Attribute Summary

Attributes inherited from ValueMapper

#calling_mapper, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ValueMapper

for, #initialize, register

Constructor Details

This class inherits a constructor from Valkyrie::ValueMapper

Class Method Details

.handles?(value) ⇒ Boolean

Returns:

  • (Boolean)


131
132
133
# File 'lib/valkyrie/persistence/postgres/orm_converter.rb', line 131

def self.handles?(value)
  value.respond_to?(:each)
end

Instance Method Details

#resultObject



135
136
137
138
139
# File 'lib/valkyrie/persistence/postgres/orm_converter.rb', line 135

def result
  value.map do |value|
    calling_mapper.for(value).result
  end
end