Class: GalterIrExporter::Export::PermissionConverter
- Inherits:
-
Object
- Object
- GalterIrExporter::Export::PermissionConverter
- Defined in:
- lib/galter_ir_exporter/export/permission_converter.rb
Overview
Convert a permission record from a ActiveFedora:Base into a PORO so that the metadata
can be exported in json format using to_json
Instance Method Summary collapse
-
#initialize(permission) ⇒ PermissionConverter
constructor
Create an instance of a Object Permission containing all the metadata for the permission.
Constructor Details
#initialize(permission) ⇒ PermissionConverter
Create an instance of a Object Permission containing all the metadata for the permission
10 11 12 13 14 15 16 |
# File 'lib/galter_ir_exporter/export/permission_converter.rb', line 10 def initialize() @id = .id @agent = .agent.first.rdf_subject.to_s @mode = .mode.first.rdf_subject.to_s # Using .id instead of .uri allows us to rebuild the URI later on with a new base URI @access_to = .access_to.id end |