Class: ConcurrentPipeline::Stores::Yaml::History

Inherits:
Object
  • Object
show all
Defined in:
lib/concurrent_pipeline/stores/yaml/history.rb

Defined Under Namespace

Classes: Version

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(registry:, path:) ⇒ History

Returns a new instance of History.



35
36
37
38
# File 'lib/concurrent_pipeline/stores/yaml/history.rb', line 35

def initialize(registry:, path:)
  @registry = registry
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



34
35
36
# File 'lib/concurrent_pipeline/stores/yaml/history.rb', line 34

def path
  @path
end

#registryObject (readonly)

Returns the value of attribute registry.



34
35
36
# File 'lib/concurrent_pipeline/stores/yaml/history.rb', line 34

def registry
  @registry
end

Instance Method Details

#versionsObject



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/concurrent_pipeline/stores/yaml/history.rb', line 40

def versions
  @versions ||= (
    changesets
      .count
      .times
      .map { |i|
        Version.new(
          index: i,
          changesets: changesets,
          registry: registry
        )
      }
  )
end