Class: DevArchive::Archives::Builder
- Inherits:
-
Object
- Object
- DevArchive::Archives::Builder
- Defined in:
- lib/dev_archive/archives.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(dir) ⇒ Builder
constructor
A new instance of Builder.
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
#dir ⇒ Object (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
#call ⇒ Object
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 |