Class: DevArchive::Archives::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/dev_archive/archives.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ Builder

Returns a new instance of Builder.



9
10
11
# File 'lib/dev_archive/archives.rb', line 9

def initialize(dir)
  @dir = dir
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



8
9
10
# File 'lib/dev_archive/archives.rb', line 8

def dir
  @dir
end

Class Method Details

.call(dir:) ⇒ Object



4
5
6
# File 'lib/dev_archive/archives.rb', line 4

def self.call(dir:)
  new(dir).call
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dev_archive/archives.rb', line 13

def call
   = (
    Cfg
      .stores
      .map { |name, store| store.backup(dir)&.merge(type: name) }
      .compact
  )

  {
    stores: 
  }
end