Class: Helmsnap::Generate

Inherits:
Service
  • Object
show all
Defined in:
lib/helmsnap/generate.rb

Instance Method Summary collapse

Methods inherited from Service

call

Constructor Details

#initialize(config, options, snapshots_path: nil) ⇒ Generate

Returns a new instance of Generate.



4
5
6
7
8
9
# File 'lib/helmsnap/generate.rb', line 4

def initialize(config, options, snapshots_path: nil)
  super()
  self.config = config
  self.options = options
  self.snapshots_path = snapshots_path || config.snapshots_path
end

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
# File 'lib/helmsnap/generate.rb', line 11

def call
  Helmsnap::SetupDependencies.call(config, options)

  Dir.mktmpdir do |tmpdir|
    tmp_path = Pathname.new(tmpdir)
    generate!(tmp_path)
  end
end