Class: GalterIrExporter::Export::VersionGraphConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/galter_ir_exporter/export/version_graph_converter.rb

Overview

Convert a graph of versions from a GenericFile into a list of POROs so that the metadata

(including pointers to the version content) can be exported in json format using to_json

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version_graph) ⇒ VersionGraphConverter

Create an instance of a GenericFile version graph containing all the metadata for each version



13
14
15
16
# File 'lib/galter_ir_exporter/export/version_graph_converter.rb', line 13

def initialize(version_graph)
  @versions = []
  parse(version_graph)
end

Instance Attribute Details

#Array<VersionConverter]Array<VersionConverter] versions list of VersionConverters extracted from the graph (readonly)

versions list of VersionConverters extracted from the graph



7
8
9
# File 'lib/galter_ir_exporter/export/version_graph_converter.rb', line 7

def Array<VersionConverter]
  @Array<VersionConverter]
end

#versionsObject (readonly)

Returns the value of attribute versions.



8
9
10
# File 'lib/galter_ir_exporter/export/version_graph_converter.rb', line 8

def versions
  @versions
end