Class: Aspen::CLI::Commands::BuildSteps::BuildStep

Inherits:
Object
  • Object
show all
Defined in:
lib/aspen/cli/commands/build_steps.rb

Instance Method Summary collapse

Instance Method Details

#callObject



25
26
27
# File 'lib/aspen/cli/commands/build_steps.rb', line 25

def call(*)
  @files = Dry::CLI::Utils::Files
end

#configObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/aspen/cli/commands/build_steps.rb', line 14

def config
  return @config if @config
  @config = {}
  Dir['config/*.yml'].each do |path|
    key = File.basename(path, File.extname(path))
    value = YAML.load_file(path)
    @config[key.to_s] = value
  end
  @config
end

#manifestObject



9
10
11
12
# File 'lib/aspen/cli/commands/build_steps.rb', line 9

def manifest
  return @manifest if @manifest
  @manifest = @files.exist?('manifest.yml') ? YAML.load_file('manifest.yml') : {}
end