Class: Valkyrie::Persistence::Postgres::ORMConverter

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

Overview

Responsible for converting a Valkyrie::Persistence::Postgres::ORM::Resource to a Resource

Defined Under Namespace

Classes: RDFMetadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(orm_object) ⇒ ORMConverter

Returns a new instance of ORMConverter.



7
8
9
# File 'lib/valkyrie/persistence/postgres/orm_converter.rb', line 7

def initialize(orm_object)
  @orm_object = orm_object
end

Instance Attribute Details

#orm_objectObject (readonly)

Returns the value of attribute orm_object.



6
7
8
# File 'lib/valkyrie/persistence/postgres/orm_converter.rb', line 6

def orm_object
  @orm_object
end

Instance Method Details

#convert!Object

Create a new instance of the class described in attributes and send it all the attributes that @orm_object has



13
14
15
# File 'lib/valkyrie/persistence/postgres/orm_converter.rb', line 13

def convert!
  @resource ||= resource
end