module Mina module Backend class Local attr_reader :commands, :configuration extend Forwardable def_delegators :configuration, :fetch, :set? def initialize(commands) @configuration = Mina::Configuration.instance @commands = commands end def prepare if fetch(:simulate) ['#!/usr/bin/env bash', '# Executing the following:', '#', commands, ' '].join("\n") else Shellwords.escape(commands) end end end end end