class Krane::CLI::RenderCommand
Constants
- OPTIONS
Public Class Methods
from_options(options)
click to toggle source
# File lib/krane/cli/render_command.rb, line 13 def self.from_options(options) require 'krane/render_task' require 'krane/bindings_parser' require 'krane/options_helper' bindings_parser = ::Krane::BindingsParser.new options[:bindings]&.each { |b| bindings_parser.add(b) } ::Krane::OptionsHelper.with_processed_template_paths(options[:filenames]) do |paths| runner = ::Krane::RenderTask.new( current_sha: options['current-sha'], template_paths: paths, bindings: bindings_parser.parse, ) runner.run!(STDOUT) end end